Class ChaCha20Poly1305.ChaCha20
java.lang.Object
com.sshtools.common.ssh.components.jce.ChaCha20Poly1305.ChaCha20
- Enclosing class:
- ChaCha20Poly1305
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclass -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidencrypt(byte[] dst, int doff, byte[] src, int soff, int len) protected voidquarterRound(int[] x, int a, int b, int c, int d) protected intROTATE(int v, int c)
-
Field Details
-
KEY_SIZE
public static final int KEY_SIZE- See Also:
-
NONCE_SIZE_REF
public static final int NONCE_SIZE_REF- See Also:
-
NONCE_SIZE_IETF
public static final int NONCE_SIZE_IETF- See Also:
-
-
Constructor Details
-
ChaCha20
public ChaCha20(byte[] key, byte[] nonce, int counter) throws ChaCha20Poly1305.ChaCha20.WrongKeySizeException, ChaCha20Poly1305.ChaCha20.WrongNonceSizeException
-
-
Method Details
-
ROTATE
protected int ROTATE(int v, int c) -
quarterRound
protected void quarterRound(int[] x, int a, int b, int c, int d) -
encrypt
public void encrypt(byte[] dst, int doff, byte[] src, int soff, int len)
-