Package com.goterl.lazysodium.interfaces
Interface Auth.Native
-
- All Known Implementing Classes:
LazySodium,LazySodiumJava
- Enclosing interface:
- Auth
public static interface Auth.Native
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancryptoAuth(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 Detail
-
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
boolean cryptoAuthHMACSha256Init(Auth.StateHMAC256 state, byte[] key, int keyLen)
-
cryptoAuthHMACSha256Update
boolean cryptoAuthHMACSha256Update(Auth.StateHMAC256 state, byte[] in, long inLen)
-
cryptoAuthHMACSha256Final
boolean cryptoAuthHMACSha256Final(Auth.StateHMAC256 state, byte[] out)
-
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
boolean cryptoAuthHMACSha512Init(Auth.StateHMAC512 state, byte[] key, int keyLen)
-
cryptoAuthHMACSha512Update
boolean cryptoAuthHMACSha512Update(Auth.StateHMAC512 state, byte[] in, long inLen)
-
cryptoAuthHMACSha512Final
boolean cryptoAuthHMACSha512Final(Auth.StateHMAC512 state, byte[] out)
-
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
boolean cryptoAuthHMACSha512256Init(Auth.StateHMAC512256 state, byte[] key, int keyLen)
-
cryptoAuthHMACSha512256Update
boolean cryptoAuthHMACSha512256Update(Auth.StateHMAC512256 state, byte[] in, long inLen)
-
cryptoAuthHMACSha512256Final
boolean cryptoAuthHMACSha512256Final(Auth.StateHMAC512256 state, byte[] out)
-
-