@Test void hashValue() { GenericHash.Hash output = GenericHash.hash(64, GenericHash.Input.fromBytes(Bytes.random(384))); assertNotNull(output); assertEquals(64, output.bytes().size()); }
public static Hash hash(int hashLength, Input input) { Pointer output = Sodium.malloc(hashLength); Sodium.crypto_generichash(output, hashLength, input.value.pointer(), input.length(), null, 0); return new Hash(output, hashLength); }
GenericHash { public static Hash hash(int hashLength, Input input) { Pointer output = Sodium.malloc(hashLength); Sodium.crypto_generichash(output, hashLength, input.value.pointer(), input.length(), null, 0); return new Hash(output, hashLength); } }
GenericHash { public static Hash hash(int hashLength, Input input) { Pointer output = Sodium.malloc(hashLength); Sodium.crypto_generichash(output, hashLength, input.value.pointer(), input.length(), null, 0); return new Hash(output, hashLength); }  }
GenericHash { public static Hash hash(int hashLength, Input input) { Pointer output = Sodium.malloc(hashLength); Sodium.crypto_generichash(output, hashLength, input.value.pointer(), input.length(), null, 0); return new Hash(output, hashLength); }  static Hash hash(int hashLength, Input input); }
GenericHash { public static Hash hash(int hashLength, Input input) { Pointer output = Sodium.malloc(hashLength); Sodium.crypto_generichash(output, hashLength, input.value.pointer(), input.length(), null, 0); return new Hash(output, hashLength); }  static Hash hash(int hashLength, Input input);  }