AesFlushingCipher


@UnstableApi
public final class AesFlushingCipher


A flushing variant of a AES/CTR/NoPadding Cipher.

Unlike a regular Cipher, the update methods of this class are guaranteed to process all of the bytes input (and hence output the same number of bytes).

Summary

Public constructors

AesFlushingCipher(int mode, byte[] secretKey, long nonce, long offset)
AesFlushingCipher(
    int mode,
    byte[] secretKey,
    @Nullable String nonce,
    long offset
)

Public methods

void
update(byte[] in, int inOffset, int length, byte[] out, int outOffset)
void
updateInPlace(byte[] data, int offset, int length)

Public constructors

AesFlushingCipher

public AesFlushingCipher(int mode, byte[] secretKey, long nonce, long offset)

AesFlushingCipher

public AesFlushingCipher(
    int mode,
    byte[] secretKey,
    @Nullable String nonce,
    long offset
)

Public methods

update

public void update(byte[] in, int inOffset, int length, byte[] out, int outOffset)

updateInPlace

public void updateInPlace(byte[] data, int offset, int length)