Top Description Inners Fields Constructors Methods
org.bouncycastle.cert.crmf.bc

public Class BcCRMFEncryptorBuilder

extends Object
Class Inheritance
Imports
java.io.OutputStream, java.security.SecureRandom, org.bouncycastle.asn1.ASN1ObjectIdentifier, org.bouncycastle.asn1.x509.AlgorithmIdentifier, org.bouncycastle.cert.crmf.CRMFException, org.bouncycastle.crypto.CipherKeyGenerator, .CryptoServicesRegistrar, org.bouncycastle.crypto.params.KeyParameter, org.bouncycastle.crypto.util.CipherFactory, org.bouncycastle.operator.GenericKey, .OutputEncryptor

Lightweight CRMFOutputEncryptor builder.

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 final int
private SecureRandom

Constructor Summary

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

Method Summary

Modifier and TypeMethod and Description
public OutputEncryptor
public BcCRMFEncryptorBuilder
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

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

Constructor Detail

BcCRMFEncryptorBuilderback to summary
public BcCRMFEncryptorBuilder(ASN1ObjectIdentifier encryptionOID)
BcCRMFEncryptorBuilderback to summary
public BcCRMFEncryptorBuilder(ASN1ObjectIdentifier encryptionOID, int keySize)

Method Detail

buildback to summary
public OutputEncryptor build() throws CRMFException
setSecureRandomback to summary
public BcCRMFEncryptorBuilder setSecureRandom(SecureRandom random)
org.bouncycastle.cert.crmf.bc back to summary

private Class BcCRMFEncryptorBuilder.CRMFOutputEncryptor

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

Field Summary

Modifier and TypeField and Description
private AlgorithmIdentifier
private Object
private KeyParameter

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 Object cipher
encKeyback to summary
private KeyParameter 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