Package com.goterl.lazysodium.interfaces
Interface Auth.Lazy
-
- All Known Implementing Classes:
LazySodium,LazySodiumJava
- Enclosing interface:
- Auth
public static interface Auth.Lazy
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringcryptoAuth(java.lang.String message, Key key)Computes a tag for the message in.java.lang.StringcryptoAuthHMACSha(Auth.Type type, java.lang.String in, Key key)java.lang.StringcryptoAuthHMACShaFinal(Auth.StateHMAC256 state)java.lang.StringcryptoAuthHMACShaFinal(Auth.StateHMAC512 state)java.lang.StringcryptoAuthHMACShaFinal(Auth.StateHMAC512256 state)booleancryptoAuthHMACShaInit(Auth.StateHMAC256 state, Key key)booleancryptoAuthHMACShaInit(Auth.StateHMAC512256 state, Key key)booleancryptoAuthHMACShaInit(Auth.StateHMAC512 state, Key key)KeycryptoAuthHMACShaKeygen(Auth.Type type)booleancryptoAuthHMACShaUpdate(Auth.StateHMAC256 state, java.lang.String in)booleancryptoAuthHMACShaUpdate(Auth.StateHMAC512256 state, java.lang.String in)booleancryptoAuthHMACShaUpdate(Auth.StateHMAC512 state, java.lang.String in)booleancryptoAuthHMACShaVerify(Auth.Type type, java.lang.String authenticator, java.lang.String message, Key key)KeycryptoAuthKeygen()Generate an authentication key.booleancryptoAuthVerify(java.lang.String tag, java.lang.String message, Key key)Verifies that the tag valid tag for the message.
-
-
-
Method Detail
-
cryptoAuthKeygen
Key cryptoAuthKeygen()
Generate an authentication key.- Returns:
- An authentication key.
-
cryptoAuth
java.lang.String cryptoAuth(java.lang.String message, Key key) throws SodiumExceptionComputes a tag for the message in.- Parameters:
message- A message.key- The key as generated bycryptoAuthKeygen().- Returns:
- True if successful.
- Throws:
SodiumException
-
cryptoAuthVerify
boolean cryptoAuthVerify(java.lang.String tag, java.lang.String message, Key key) throws SodiumExceptionVerifies that the tag valid tag for the message.- Parameters:
tag- The tag.key- The key as generated bycryptoAuthKeygen().- Returns:
- True if successful verification.
- Throws:
SodiumException
-
cryptoAuthHMACShaVerify
boolean cryptoAuthHMACShaVerify(Auth.Type type, java.lang.String authenticator, java.lang.String message, Key key)
-
cryptoAuthHMACShaInit
boolean cryptoAuthHMACShaInit(Auth.StateHMAC256 state, Key key)
-
cryptoAuthHMACShaUpdate
boolean cryptoAuthHMACShaUpdate(Auth.StateHMAC256 state, java.lang.String in)
-
cryptoAuthHMACShaFinal
java.lang.String cryptoAuthHMACShaFinal(Auth.StateHMAC256 state) throws SodiumException
- Throws:
SodiumException
-
cryptoAuthHMACShaInit
boolean cryptoAuthHMACShaInit(Auth.StateHMAC512 state, Key key)
-
cryptoAuthHMACShaUpdate
boolean cryptoAuthHMACShaUpdate(Auth.StateHMAC512 state, java.lang.String in)
-
cryptoAuthHMACShaFinal
java.lang.String cryptoAuthHMACShaFinal(Auth.StateHMAC512 state) throws SodiumException
- Throws:
SodiumException
-
cryptoAuthHMACShaInit
boolean cryptoAuthHMACShaInit(Auth.StateHMAC512256 state, Key key)
-
cryptoAuthHMACShaUpdate
boolean cryptoAuthHMACShaUpdate(Auth.StateHMAC512256 state, java.lang.String in)
-
cryptoAuthHMACShaFinal
java.lang.String cryptoAuthHMACShaFinal(Auth.StateHMAC512256 state) throws SodiumException
- Throws:
SodiumException
-
-