Top Description Fields Constructors Methods
org.bouncycastle.crypto.fips

public Class FipsNonceGenerator

extends Object
Class Inheritance
Imports
org.bouncycastle.crypto.CryptoServicesRegistrar, org.bouncycastle.util.Arrays

Nonce generator for use with AEAD ciphers such as GCM. The generator guarantees the sequence number cannot wrap or go backwards.

Field Summary

Modifier and TypeField and Description
private final byte[]
private final int
private boolean
private final long
private long

Constructor Summary

AccessConstructor and Description
public
FipsNonceGenerator(byte[] baseNonce, int counterBits)

Method Summary

Modifier and TypeMethod and Description
public void
generateNonce(byte[] nonce)

private void
xorCounter(byte[] buf, int off)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

baseNonceback to summary
private final byte[] baseNonce
counterBytesback to summary
private final int counterBytes
counterExhaustedback to summary
private boolean counterExhausted
counterMaskback to summary
private final long counterMask
counterValueback to summary
private long counterValue

Constructor Detail

FipsNonceGeneratorback to summary
public FipsNonceGenerator(byte[] baseNonce, int counterBits)

Method Detail

generateNonceback to summary
public void generateNonce(byte[] nonce)
xorCounterback to summary
private void xorCounter(byte[] buf, int off)