public class ChaCha extends Object implements CipherAlgorithm
A singleton
| Modifier and Type | Method and Description |
|---|---|
UUID |
getCipherUuid()
Returns the UUID of this algorithm
|
InputStream |
getDecryptedInputStream(InputStream encryptedInputStream,
byte[] key,
byte[] iv)
Create a decrypted stream from the supplied encrypted one
|
OutputStream |
getEncryptedOutputStream(OutputStream decryptedOutputStream,
byte[] key,
byte[] iv)
Create an encrypted stream from the supplied unencrypted one
|
static ChaCha |
getInstance() |
String |
getName()
Return the name of this algorithm
|
public static ChaCha getInstance()
public UUID getCipherUuid()
CipherAlgorithmgetCipherUuid in interface CipherAlgorithmpublic String getName()
CipherAlgorithmgetName in interface CipherAlgorithmpublic InputStream getDecryptedInputStream(InputStream encryptedInputStream, byte[] key, byte[] iv)
CipherAlgorithmgetDecryptedInputStream in interface CipherAlgorithmencryptedInputStream - an encrypted streamkey - the decryption keyiv - the ivpublic OutputStream getEncryptedOutputStream(OutputStream decryptedOutputStream, byte[] key, byte[] iv)
CipherAlgorithmgetEncryptedOutputStream in interface CipherAlgorithmdecryptedOutputStream - an unencrypted streamkey - a keyiv - an ivCopyright © 2025. All rights reserved.