We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Algorand.Crypto.KeyPair
Algorand.Unity.PrivateKey
1 parent 25beba1 commit cfa72ffCopy full SHA for cfa72ff
Runtime/Algorand.Unity/Accounts/PrivateKey.cs
@@ -97,6 +97,14 @@ public static explicit operator Algorand.Utils.Crypto.FixedSecureRandom(PrivateK
97
return new Algorand.Utils.Crypto.FixedSecureRandom(pk.ToArray());
98
}
99
100
+ public static explicit operator PrivateKey(Algorand.Crypto.KeyPair kp)
101
+ {
102
+ var pkBytes = kp.ClearTextPrivateKey;
103
+ var result = new PrivateKey();
104
+ result.CopyFrom(pkBytes, 0, 32);
105
+ return result;
106
+ }
107
+
108
public static explicit operator Algorand.Crypto.KeyPair(PrivateKey pk)
109
{
110
return new Algorand.Crypto.KeyPair((Algorand.Utils.Crypto.FixedSecureRandom)pk);
0 commit comments