public class EncryptedNonce extends Object implements Nonce
Instances of this class are thread safe.
Constructor and Description |
---|
EncryptedNonce(org.bouncycastle.crypto.BlockCipher cipher,
SecretKey key)
Creates a new instance.
|
EncryptedNonce(Spec<org.bouncycastle.crypto.BlockCipher> cipherSpec,
SecretKey key)
Creates a new instance.
|
public EncryptedNonce(Spec<org.bouncycastle.crypto.BlockCipher> cipherSpec, SecretKey key)
cipherSpec
- Block cipher specification.key
- Symmetric key.public EncryptedNonce(org.bouncycastle.crypto.BlockCipher cipher, SecretKey key)
cipher
- Block cipher to use.key
- Symmetric key.public byte[] generate() throws LimitException
Nonce
generate
in interface Nonce
LimitException
- When a limit imposed by the nonce generation strategy, if any, is exceeded.Copyright © 2003-2024 Virginia Tech. All Rights Reserved.