Package org.signal.libsignal.crypto
Class Aes256Ctr32
-
- All Implemented Interfaces:
-
org.signal.libsignal.internal.NativeHandleGuard.Owner
public class Aes256Ctr32 extends NativeHandleGuard.SimpleOwner
Implements the AES-256-CTR stream cipher with a 12-byte nonce and an initial counter.
CTR mode is built on XOR, so encrypting and decrypting are the same operation.
-
-
Constructor Summary
Constructors Constructor Description Aes256Ctr32(Array<byte> key, Array<byte> nonce, int initialCtr)
-
Method Summary
Modifier and Type Method Description voidprocess(Array<byte> data)Encrypts the plaintext, or decrypts the ciphertext, in data, in place, advancing the state of the cipher.voidprocess(Array<byte> data, int offset, int length)Encrypts the plaintext, or decrypts the ciphertext, in data, in place, advancing the state of the cipher.-
Methods inherited from class org.signal.libsignal.internal.NativeHandleGuard.SimpleOwner
unsafeNativeHandleWithoutGuard -
Methods inherited from class org.signal.libsignal.internal.NativeHandleGuard.Owner
guard, guardedMap, guardedMapChecked, guardedRun, guardedRunChecked -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-