示例#1
0
 /// <summary>
 /// Resets Ed25519 keypair
 /// </summary>
 public void ResetKeypair()
 {
     lock (KeypairLock)
     {
         Keypair = null;
     }
 }
示例#2
0
 /// <summary>
 /// Returns Ed25519 private key
 /// </summary>
 /// <returns>Ed25519 private key</returns>
 public byte[] GetPrivateKey()
 {
     lock (KeypairLock)
     {
         if (Keypair == null)
         {
             Keypair = new eduLibsodium.Box();
         }
     }
     return(Keypair.SecretKey);
 }
示例#3
0
 /// <summary>
 /// Returns Ed25519 public key
 /// </summary>
 /// <returns>Ed25519 public key</returns>
 public byte[] GetPublicKey()
 {
     lock (KeypairLock)
     {
         if (Keypair == null)
         {
             Keypair = new eduLibsodium.Box();
         }
     }
     return(Keypair.PublicKey);
 }