Beispiel #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[16];
     SodiumLibrary.crypto_onetimeauth(array, message, (long)message.Length, key);
     return(array);
 }