Package moe.kyokobot.koe.internal.crypto
Interface EncryptionMode
- All Known Implementing Classes:
AEADAES256GCMRTPSizeEncryptionMode,AEADXChaCha20Poly1305RTPSizeEncryptionMode,PlainEncryptionMode,XSalsa20Poly1305EncryptionMode,XSalsa20Poly1305LiteEncryptionMode,XSalsa20Poly1305SuffixEncryptionMode
public interface EncryptionMode
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final SecureRandomstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionbooleanbox(io.netty.buffer.ByteBuf plain, int start, io.netty.buffer.ByteBuf output, byte[] secretKey) static EncryptionModegetName()static Stringdefault voidvalidateKey(byte[] secretKey) Checks the key once per session,box(io.netty.buffer.ByteBuf, int, io.netty.buffer.ByteBuf, byte[])assumes it was validated.
-
Field Details
-
SECURE_RANDOM
-
ZERO_BYTES_LENGTH
static final int ZERO_BYTES_LENGTH- See Also:
-
TAG_BYTES_LENGTH
static final int TAG_BYTES_LENGTH- See Also:
-
SECRET_KEY_LENGTH
static final int SECRET_KEY_LENGTH- See Also:
-
-
Method Details
-
validateKey
default void validateKey(byte[] secretKey) Checks the key once per session,box(io.netty.buffer.ByteBuf, int, io.netty.buffer.ByteBuf, byte[])assumes it was validated.- Throws:
IllegalArgumentException- if the key can't be used with this mode
-
box
boolean box(io.netty.buffer.ByteBuf plain, int start, io.netty.buffer.ByteBuf output, byte[] secretKey) -
getName
String getName() -
select
-
get
-