Interface Auth.Native
- All Known Implementing Classes:
LazySodium,LazySodiumJava
- Enclosing interface:
- Auth
public static interface Auth.Native
-
Method Summary
Modifier and TypeMethodDescriptionbooleancryptoAuth(byte[] tag, byte[] in, long inLen, byte[] key) Computes a tag for the message in, whose length is inLen bytes, and the key k.booleancryptoAuthHMACSha256(byte[] out, byte[] in, long inLen, byte[] k) booleancryptoAuthHMACSha256Final(Auth.StateHMAC256 state, byte[] out) booleancryptoAuthHMACSha256Init(Auth.StateHMAC256 state, byte[] key, int keyLen) voidcryptoAuthHMACSha256Keygen(byte[] key) booleancryptoAuthHMACSha256Update(Auth.StateHMAC256 state, byte[] in, long inLen) booleancryptoAuthHMACSha256Verify(byte[] h, byte[] in, long inLen, byte[] k) booleancryptoAuthHMACSha512(byte[] out, byte[] in, long inLen, byte[] k) booleancryptoAuthHMACSha512256(byte[] out, byte[] in, long inLen, byte[] k) booleancryptoAuthHMACSha512256Final(Auth.StateHMAC512256 state, byte[] out) booleancryptoAuthHMACSha512256Init(Auth.StateHMAC512256 state, byte[] key, int keyLen) voidcryptoAuthHMACSha512256Keygen(byte[] key) booleancryptoAuthHMACSha512256Update(Auth.StateHMAC512256 state, byte[] in, long inLen) booleancryptoAuthHMACSha512256Verify(byte[] h, byte[] in, long inLen, byte[] k) booleancryptoAuthHMACSha512Final(Auth.StateHMAC512 state, byte[] out) booleancryptoAuthHMACSha512Init(Auth.StateHMAC512 state, byte[] key, int keyLen) voidcryptoAuthHMACSha512Keygen(byte[] key) booleancryptoAuthHMACSha512Update(Auth.StateHMAC512 state, byte[] in, long inLen) booleancryptoAuthHMACSha512Verify(byte[] h, byte[] in, long inLen, byte[] k) voidcryptoAuthKeygen(byte[] k) Generate an authentication key.booleancryptoAuthVerify(byte[] tag, byte[] in, long inLen, byte[] key) Verifies that the tag stored at h is a valid tag for the message in whose length is inLen bytes, and the key k.
-
Method Details
-
cryptoAuthKeygen
void cryptoAuthKeygen(byte[] k) Generate an authentication key.- Parameters:
k- Auth key of sizeAuth.KEYBYTES.
-
cryptoAuth
boolean cryptoAuth(byte[] tag, byte[] in, long inLen, byte[] key) Computes a tag for the message in, whose length is inLen bytes, and the key k.- Parameters:
tag- Tag of sizeAuth.BYTES.in- A message.inLen- Message size.key- The key as generated bycryptoAuthKeygen(byte[]).- Returns:
- True if successful.
-
cryptoAuthVerify
boolean cryptoAuthVerify(byte[] tag, byte[] in, long inLen, byte[] key) Verifies that the tag stored at h is a valid tag for the message in whose length is inLen bytes, and the key k.- Parameters:
tag- The tag.in- The message.inLen- Message bytes.key- The key as generated bycryptoAuthKeygen(byte[]).- Returns:
- True if successful verification.
-
cryptoAuthHMACSha256Keygen
void cryptoAuthHMACSha256Keygen(byte[] key) -
cryptoAuthHMACSha256
boolean cryptoAuthHMACSha256(byte[] out, byte[] in, long inLen, byte[] k) -
cryptoAuthHMACSha256Verify
boolean cryptoAuthHMACSha256Verify(byte[] h, byte[] in, long inLen, byte[] k) -
cryptoAuthHMACSha256Init
-
cryptoAuthHMACSha256Update
-
cryptoAuthHMACSha256Final
-
cryptoAuthHMACSha512Keygen
void cryptoAuthHMACSha512Keygen(byte[] key) -
cryptoAuthHMACSha512
boolean cryptoAuthHMACSha512(byte[] out, byte[] in, long inLen, byte[] k) -
cryptoAuthHMACSha512Verify
boolean cryptoAuthHMACSha512Verify(byte[] h, byte[] in, long inLen, byte[] k) -
cryptoAuthHMACSha512Init
-
cryptoAuthHMACSha512Update
-
cryptoAuthHMACSha512Final
-
cryptoAuthHMACSha512256Keygen
void cryptoAuthHMACSha512256Keygen(byte[] key) -
cryptoAuthHMACSha512256
boolean cryptoAuthHMACSha512256(byte[] out, byte[] in, long inLen, byte[] k) -
cryptoAuthHMACSha512256Verify
boolean cryptoAuthHMACSha512256Verify(byte[] h, byte[] in, long inLen, byte[] k) -
cryptoAuthHMACSha512256Init
-
cryptoAuthHMACSha512256Update
-
cryptoAuthHMACSha512256Final
-