コード例 #1
0
 public static byte[] Open(string cipherText, byte[] nonce, byte[] key)
 {
     return(SecretBox.Open(Utilities.HexToBinary(cipherText), nonce, key));
 }
コード例 #2
0
 public static byte[] Create(string message, byte[] nonce, byte[] key)
 {
     return(SecretBox.Create(Encoding.UTF8.GetBytes(message), nonce, key));
 }
コード例 #3
0
 public static DetachedBox CreateDetached(string message, byte[] nonce, byte[] key)
 {
     return(SecretBox.CreateDetached(Encoding.UTF8.GetBytes(message), nonce, key));
 }
コード例 #4
0
 public static byte[] OpenDetached(DetachedBox detached, byte[] nonce, byte[] key)
 {
     return(SecretBox.OpenDetached(detached.CipherText, detached.Mac, nonce, key));
 }