@Test void hashValue() { SHA256Hash.Hash output = SHA256Hash.hash(SHA256Hash.Input.fromBytes(Bytes.random(384))); assertNotNull(output); assertEquals(32, output.bytes().size()); }
public static SHA256Hash.Hash hash(SHA256Hash.Input input) { Pointer output = Sodium.malloc(SHA256Hash.Hash.length()); Sodium.crypto_hash_sha256(output, input.value.pointer(), input.length()); return new SHA256Hash.Hash(output, SHA256Hash.Hash.length()); }
SHA256Hash { public static SHA256Hash.Hash hash(SHA256Hash.Input input) { Pointer output = Sodium.malloc(SHA256Hash.Hash.length()); Sodium.crypto_hash_sha256(output, input.value.pointer(), input.length()); return new SHA256Hash.Hash(output, SHA256Hash.Hash.length()); } }
SHA256Hash { public static SHA256Hash.Hash hash(SHA256Hash.Input input) { Pointer output = Sodium.malloc(SHA256Hash.Hash.length()); Sodium.crypto_hash_sha256(output, input.value.pointer(), input.length()); return new SHA256Hash.Hash(output, SHA256Hash.Hash.length()); }  }
SHA256Hash { public static SHA256Hash.Hash hash(SHA256Hash.Input input) { Pointer output = Sodium.malloc(SHA256Hash.Hash.length()); Sodium.crypto_hash_sha256(output, input.value.pointer(), input.length()); return new SHA256Hash.Hash(output, SHA256Hash.Hash.length()); }  static SHA256Hash.Hash hash(SHA256Hash.Input input); }
SHA256Hash { public static SHA256Hash.Hash hash(SHA256Hash.Input input) { Pointer output = Sodium.malloc(SHA256Hash.Hash.length()); Sodium.crypto_hash_sha256(output, input.value.pointer(), input.length()); return new SHA256Hash.Hash(output, SHA256Hash.Hash.length()); }  static SHA256Hash.Hash hash(SHA256Hash.Input input);  }