File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,15 @@ public class PrivateKeyFile : IDisposable
79
79
/// </summary>
80
80
public HostAlgorithm HostKey { get ; private set ; }
81
81
82
+ /// <summary>
83
+ /// Initializes a new instance of the <see cref="PrivateKeyFile"/> class.
84
+ /// </summary>
85
+ /// <param name="key">The key.</param>
86
+ public PrivateKeyFile ( Key key )
87
+ {
88
+ HostKey = new KeyHostAlgorithm ( key . ToString ( ) , key ) ;
89
+ }
90
+
82
91
/// <summary>
83
92
/// Initializes a new instance of the <see cref="PrivateKeyFile"/> class.
84
93
/// </summary>
Original file line number Diff line number Diff line change @@ -99,6 +99,15 @@ public ED25519Key()
99
99
{
100
100
}
101
101
102
+ /// <summary>
103
+ /// Initializes a new instance of the <see cref="ED25519Key"/> class.
104
+ /// </summary>
105
+ /// <param name="pk">pk data.</param>
106
+ public ED25519Key ( byte [ ] pk )
107
+ {
108
+ publicKey = pk . TrimLeadingZeros ( ) . Pad ( Ed25519 . PublicKeySizeInBytes ) ;
109
+ }
110
+
102
111
/// <summary>
103
112
/// Initializes a new instance of the <see cref="ED25519Key"/> class.
104
113
/// </summary>
You can’t perform that action at this time.
0 commit comments