public class ChaCha20Poly1305 extends SshCipher
| Modifier and Type | Class and Description |
|---|---|
static class |
ChaCha20Poly1305.ChaCha20 |
static class |
ChaCha20Poly1305.Poly1305
Poly1305 message authentication code, designed by D.
|
DECRYPT_MODE, ENCRYPT_MODE| Constructor and Description |
|---|
ChaCha20Poly1305() |
| Modifier and Type | Method and Description |
|---|---|
int |
getBlockSize()
Get the cipher block size.
|
int |
getKeyLength()
Return the key length required
|
int |
getMacLength() |
java.lang.String |
getProviderName() |
void |
init(int mode,
byte[] iv,
byte[] keydata)
Initialize the cipher with up to 40 bytes of iv and key data.
|
protected static void |
intToLittleEndian(int n,
byte[] bs,
int off) |
boolean |
isMAC() |
protected static int |
littleEndianToInt(byte[] bs,
int i) |
long |
readPacketLength(byte[] encoded,
com.sshtools.common.util.UnsignedInteger64 sequenceNo) |
void |
transform(byte[] src,
int start,
byte[] dest,
int offset,
int len)
Transform the byte array according to the cipher mode; it is legal for the
source and destination arrays to reference the same physical array so
care should be taken in the transformation process to safeguard this rule.
|
byte[] |
writePacketLength(int length,
com.sshtools.common.util.UnsignedInteger64 sequenceNo) |
getAlgorithm, getPriority, getSecurityLevel, transformpublic ChaCha20Poly1305()
throws java.io.IOException
java.io.IOExceptionpublic void init(int mode,
byte[] iv,
byte[] keydata)
throws java.io.IOException
SshCipherpublic int getBlockSize()
SshCiphergetBlockSize in class SshCipherpublic int getKeyLength()
SshCiphergetKeyLength in class SshCipherpublic int getMacLength()
getMacLength in class SshCipherpublic void transform(byte[] src,
int start,
byte[] dest,
int offset,
int len)
throws java.io.IOException
SshCipherpublic java.lang.String getProviderName()
getProviderName in class SshCipherpublic long readPacketLength(byte[] encoded,
com.sshtools.common.util.UnsignedInteger64 sequenceNo)
throws java.io.IOException
java.io.IOExceptionpublic byte[] writePacketLength(int length,
com.sshtools.common.util.UnsignedInteger64 sequenceNo)
throws java.io.IOException
java.io.IOExceptionprotected static int littleEndianToInt(byte[] bs,
int i)
protected static void intToLittleEndian(int n,
byte[] bs,
int off)
Copyright © 2022. All rights reserved.