Top Inners Fields Constructors Methods
org.bouncycastle.cert.crmf.jcajce

public Class JceCRMFEncryptorBuilder

extends Object
Class Inheritance
Imports
java.io.OutputStream, java.security.AlgorithmParameters, .GeneralSecurityException, .Provider, .SecureRandom, javax.crypto.Cipher, .KeyGenerator, .SecretKey, org.bouncycastle.asn1.ASN1ObjectIdentifier, org.bouncycastle.asn1.x509.AlgorithmIdentifier, org.bouncycastle.cert.crmf.CRMFException, org.bouncycastle.jcajce.io.CipherOutputStream, org.bouncycastle.jcajce.util.DefaultJcaJceHelper, .NamedJcaJceHelper, .ProviderJcaJceHelper, org.bouncycastle.operator.DefaultSecretKeySizeProvider, .GenericKey, .OutputEncryptor, .SecretKeySizeProvider, org.bouncycastle.operator.jcajce.JceGenericKey

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final ASN1ObjectIdentifier
private CRMFHelper
private static final SecretKeySizeProvider
private final int
private SecureRandom

Constructor Summary

AccessConstructor and Description
public
public
JceCRMFEncryptorBuilder(ASN1ObjectIdentifier encryptionOID, int keySize)

Method Summary

Modifier and TypeMethod and Description
public OutputEncryptor
public JceCRMFEncryptorBuilder
public JceCRMFEncryptorBuilder
setProvider(String providerName)

public JceCRMFEncryptorBuilder
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

encryptionOIDback to summary
private final ASN1ObjectIdentifier encryptionOID
helperback to summary
private CRMFHelper helper
KEY_SIZE_PROVIDERback to summary
private static final SecretKeySizeProvider KEY_SIZE_PROVIDER
keySizeback to summary
private final int keySize
randomback to summary
private SecureRandom random

Constructor Detail

JceCRMFEncryptorBuilderback to summary
public JceCRMFEncryptorBuilder(ASN1ObjectIdentifier encryptionOID)
JceCRMFEncryptorBuilderback to summary
public JceCRMFEncryptorBuilder(ASN1ObjectIdentifier encryptionOID, int keySize)

Method Detail

buildback to summary
public OutputEncryptor build() throws CRMFException
setProviderback to summary
public JceCRMFEncryptorBuilder setProvider(Provider provider)
setProviderback to summary
public JceCRMFEncryptorBuilder setProvider(String providerName)
setSecureRandomback to summary
public JceCRMFEncryptorBuilder setSecureRandom(SecureRandom random)
org.bouncycastle.cert.crmf.jcajce back to summary

private Class JceCRMFEncryptorBuilder.CRMFOutputEncryptor

extends Object
implements OutputEncryptor
Class Inheritance
  • java.lang.Object
  • org.bouncycastle.cert.crmf.jcajce.JceCRMFEncryptorBuilder.CRMFOutputEncryptor
All Implemented Interfaces
org.bouncycastle.operator.OutputEncryptor

Field Summary

Modifier and TypeField and Description
private AlgorithmIdentifier
private Cipher
private SecretKey

Constructor Summary

AccessConstructor and Description
pack-priv
CRMFOutputEncryptor(ASN1ObjectIdentifier encryptionOID, int keySize, SecureRandom random)

Method Summary

Modifier and TypeMethod and Description
public AlgorithmIdentifier
getAlgorithmIdentifier()

Implements org.bouncycastle.operator.OutputEncryptor.getAlgorithmIdentifier.

Return the algorithm identifier describing the encryption algorithm and parameters this encryptor uses.

public GenericKey
getKey()

Implements org.bouncycastle.operator.OutputEncryptor.getKey.

Return the key used for encrypting the output.

public OutputStream
getOutputStream(OutputStream
output stream for encrypted output.
dOut
)

Implements org.bouncycastle.operator.OutputEncryptor.getOutputStream.

Wrap the passed in output stream encOut, returning an output stream that encrypts anything passed in before sending on to encOut.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

algorithmIdentifierback to summary
private AlgorithmIdentifier algorithmIdentifier
cipherback to summary
private Cipher cipher
encKeyback to summary
private SecretKey encKey

Constructor Detail

CRMFOutputEncryptorback to summary
pack-priv CRMFOutputEncryptor(ASN1ObjectIdentifier encryptionOID, int keySize, SecureRandom random) throws CRMFException

Method Detail

getAlgorithmIdentifierback to summary
public AlgorithmIdentifier getAlgorithmIdentifier()

Implements org.bouncycastle.operator.OutputEncryptor.getAlgorithmIdentifier.

Doc from org.bouncycastle.operator.OutputEncryptor.getAlgorithmIdentifier.

Return the algorithm identifier describing the encryption algorithm and parameters this encryptor uses.

Returns:AlgorithmIdentifier

algorithm oid and parameters.

getKeyback to summary
public GenericKey getKey()

Implements org.bouncycastle.operator.OutputEncryptor.getKey.

Doc from org.bouncycastle.operator.OutputEncryptor.getKey.

Return the key used for encrypting the output.

Returns:GenericKey

the encryption key.

getOutputStreamback to summary
public OutputStream getOutputStream(OutputStream dOut)

Implements org.bouncycastle.operator.OutputEncryptor.getOutputStream.

Doc from org.bouncycastle.operator.OutputEncryptor.getOutputStream.

Wrap the passed in output stream encOut, returning an output stream that encrypts anything passed in before sending on to encOut.

Parameters
dOut:OutputStream

output stream for encrypted output.

Returns:OutputStream

an encrypting OutputStream