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
generate
in interface Nonce
LimitException
- When a limit imposed by the nonce generation
strategy, if any, is exceeded.Copyright © 2016 JBoss by Red Hat. All rights reserved.