예제 #1
0
 public static byte[] Sign(byte[] message, byte[] key)
 {
     if (key == null || key.Length != 32)
     {
         throw new KeyOutOfRangeException("key", (key == null) ? 0 : key.Length, string.Format("key must be {0} bytes in length.", 32));
     }
     byte[] array = new byte[32];
     SodiumLibrary.crypto_auth(array, message, (long)message.Length, key);
     return(array);
 }