Skip to content

Commit 3e5dbc3

Browse files
committed
Add ED25519 ctor for just pub key part.
1 parent 33d9208 commit 3e5dbc3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: src/Renci.SshNet/Security/Cryptography/ED25519Key.cs

+9
Original file line numberDiff line numberDiff 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>

0 commit comments

Comments
 (0)