public static byte[] Hash(byte[] message, byte[] key) { if (key == null || key.Length != 16) { throw new KeyOutOfRangeException("key", (key == null) ? 0 : key.Length, string.Format("key must be {0} bytes in length.", 16)); } byte[] array = new byte[8]; SodiumLibrary.crypto_shorthash(array, message, (long)message.Length, key); return(array); }