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
7979 /// </summary>
8080 public HostAlgorithm HostKey { get ; private set ; }
8181
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+
8291 /// <summary>
8392 /// Initializes a new instance of the <see cref="PrivateKeyFile"/> class.
8493 /// </summary>
Original file line number Diff line number Diff line change @@ -99,6 +99,15 @@ public ED25519Key()
9999 {
100100 }
101101
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+
102111 /// <summary>
103112 /// Initializes a new instance of the <see cref="ED25519Key"/> class.
104113 /// </summary>
You can’t perform that action at this time.
0 commit comments