-
public interface SecretStream.Lazy
-
-
Method Summary
Modifier and Type Method Description abstract KeycryptoSecretStreamKeygen()Generates a key. abstract SecretStream.StatecryptoSecretStreamInitPush(Array<byte> header, Key key)Initialise encryption. abstract StringcryptoSecretStreamPush(SecretStream.State state, String message, byte tag)Encrypt a {@code message}.abstract SecretStream.StatecryptoSecretStreamInitPull(Array<byte> header, Key key)Initialises decryption using a state and a key. abstract StringcryptoSecretStreamPull(SecretStream.State state, String cipher, Array<byte> tag)Decrypt a message without additional data. abstract voidcryptoSecretStreamRekey(SecretStream.State state)Explicitly rekeys. -
-
Method Detail
-
cryptoSecretStreamKeygen
abstract Key cryptoSecretStreamKeygen()
Generates a key.
-
cryptoSecretStreamInitPush
abstract SecretStream.State cryptoSecretStreamInitPush(Array<byte> header, Key key)
Initialise encryption.
- Parameters:
header- Header to supply.key- The key as generated by cryptoSecretStreamKeygen.
-
cryptoSecretStreamPush
abstract String cryptoSecretStreamPush(SecretStream.State state, String message, byte tag)
Encrypt a
{@code message}.- Parameters:
state- State as initialised in cryptoSecretStreamInitPush.message- The message to encrypt.tag- The tag.
-
cryptoSecretStreamInitPull
abstract SecretStream.State cryptoSecretStreamInitPull(Array<byte> header, Key key)
Initialises decryption using a state and a key.
- Parameters:
header- The header of size HEADERBYTES.key- The key as generated by cryptoSecretStreamKeygen}.
-
cryptoSecretStreamPull
abstract String cryptoSecretStreamPull(SecretStream.State state, String cipher, Array<byte> tag)
Decrypt a message without additional data.
- Parameters:
state- The state as generated by cryptoSecretStreamInitPull.cipher- The resulting encrypted message.tag- The tag.
-
cryptoSecretStreamRekey
abstract void cryptoSecretStreamRekey(SecretStream.State state)
Explicitly rekeys.
- Parameters:
state- The state to update.
-
-
-
-