Interface IBouncyCastleFactory
- All Known Implementing Classes:
-
BouncyCastleFactory
,BouncyCastleFipsFactory
public interface IBouncyCastleFactory
IBouncyCastleFactory
contains methods required for bouncy-classes objects creation. Implementation will be selected depending on a bouncy-castle dependency specified by the user.
-
Method Summary
Modifier and TypeMethodDescriptionCreate OCSP Exception wrapper from usualException
.createAlgorithmIdentifier
(IASN1ObjectIdentifier algorithm) Create algorithm identifier wrapper from ASN1 Object identifier wrapper.createAlgorithmIdentifier
(IASN1ObjectIdentifier algorithm, IASN1Encodable parameters) Create algorithm identifier wrapper from ASN1 Object identifier wrapper and ASN1 Encodable wrapper for the parameters.createASN1BitString
(IASN1Encodable encodable) Cast ASN1 Encodable wrapper to ASN1 Bit string wrapper.Create ASN1 Dump wrapper without parameters.Create ASN1 Encodable wrapper without parameters.Create ASN1 Encoding without parameters.createASN1Enumerated
(int i) Create ASN1 Enumerated wrapper fromint
value.createASN1GeneralizedTime
(IASN1Encodable encodable) Cast ASN1 Encodable wrapper to ASN1 Generalized time wrapper.createASN1InputStream
(byte[] bytes) Create ASN1 Input stream wrapper frombyte[]
.createASN1InputStream
(InputStream stream) Create ASN1 Input stream wrapper fromInputStream
.createASN1Integer
(int i) Create ASN1 Integer wrapper fromint
.createASN1Integer
(IASN1Encodable encodable) Cast ASN1 Encodable wrapper to ASN1 Integer wrapper.Create ASN1 Integer wrapper fromBigInteger
.createASN1ObjectIdentifier
(IASN1Encodable encodable) Cast ASN1 encodable wrapper to the ASN1 object identifier wrapper.Create ASN1 Object identifier wrapper fromString
.Create ASN1 Object identifier wrapper fromObject
usinggetInstance
method call.createASN1OctetString
(byte[] bytes) Create ASN1 Octet string wrapper frombyte[]
.createASN1OctetString
(IASN1Encodable encodable) Cast ASN1 Encodable wrapper to the ASN1 Octet string wrapper.createASN1OctetString
(IASN1TaggedObject taggedObject, boolean b) Create ASN1 Octet string wrapper from ASN1 Tagged object wrapper andboolean
parameter.createASN1OutputStream
(OutputStream stream) Create ASN1 Output stream wrapper fromOutputStream
.createASN1OutputStream
(OutputStream outputStream, String asn1Encoding) Create ASN1 Output stream wrapper fromOutputStream
and ASN1 Encoding.createASN1Primitive
(byte[] array) Create ASN1 Primitive wrapper frombyte[]
value.createASN1Primitive
(IASN1Encodable encodable) Cast ASN1 Encodable wrapper to ASN1 Primitive wrapper.createASN1Sequence
(byte[] array) Create ASN1 Sequence wrapper frombyte[]
.createASN1Sequence
(IASN1Encodable encodable) Cast ASN1 encodable wrapper to the ASN1 Sequence wrapper.createASN1Sequence
(Object object) CastObject
to ASN1 Sequence wrapper.createASN1SequenceInstance
(Object object) Create ASN1 Sequence wrapper fromObject
usinggetInstance
method call.createASN1Set
(IASN1Encodable encodable) Cast ASN1 Encodable wrapper to ASN1 Set wrapper.createASN1Set
(IASN1TaggedObject taggedObject, boolean b) Create ASN1 Set wrapper from ASN1 Tagged object wrapper andboolean
parameter.createASN1Set
(Object encodable) Create ASN1 Set wrapper fromObject
.createASN1String
(IASN1Encodable encodable) Cast ASN1 Encodable wrapper to ASN1 String wrapper.createASN1TaggedObject
(IASN1Encodable encodable) Create ASN1 Tagged object wrapper from ASN1 Encodable wrapper.createASN1UTCTime
(IASN1Encodable encodable) Cast ASN1 Encodable wrapper to ASN1 UTC Time wrapper.createAttribute
(IASN1ObjectIdentifier attrType, IASN1Set attrValues) Create attribute wrapper from ASN1 Object identifier wrapper and ASN1 Set wrapper.createAttributeTable
(IASN1Set unat) Create attribute table wrapper from ASN1 Set wrapper.createBasicConstraints
(boolean b) Create basic constraints wrapper fromboolean
value.createBasicOCSPResp
(IBasicOCSPResponse response) Create basic OCSP Resp wrapper from basic OCSP Response wrapper.createBasicOCSPResp
(Object response) Create basic OCSP Resp wrapper fromObject
.createBasicOCSPRespBuilder
(IRespID respID) Create basic OCSP Resp builder wrapper from resp ID wrapper.createBasicOCSPResponse
(IASN1Primitive primitive) Create basic OCSP Response wrapper from ASN1 Primitive wrapper.Create certificate ID wrapper without parameters.createCertificateID
(IDigestCalculator digestCalculator, IX509CertificateHolder certificateHolder, BigInteger bigInteger) Create certificate ID wrapper from digest calculator, X509 Certificate holder wrappers andBigInteger
.Create certificate status wrapper without parameters.byte[]
createCipherBytes
(X509Certificate x509certificate, byte[] abyte0, IAlgorithmIdentifier algorithmIdentifier) Create cipher bytes fromX509Certificate
,byte[]
value and algorithm identifier wrapper.createCMSEnvelopedData
(byte[] valueBytes) Create CMS enveloped data frombyte[]
value.createContentInfo
(IASN1ObjectIdentifier objectIdentifier, IASN1Encodable encodable) Create content info wrapper from ASN1 Object identifier wrapper and ASN1 Encodable wrapper.createContentInfo
(IASN1Sequence sequence) Create content info wrapper from ASN1 Sequence wrapper.createCRLDistPoint
(Object object) Create CRL Dist point wrapper fromObject
.Create CRL Reason wrapper without parameters.createDERIA5String
(IASN1TaggedObject taggedObject, boolean b) Create DERIA5 String wrapper from ASN1 Tagged object wrapper andboolean
value.createDERIA5String
(String str) Create DERIA5 String wrapper fromString
value.Create DER Null wrapper without parameters.createDEROctetString
(byte[] bytes) Create DER Octet string wrapper frombyte[]
.createDEROctetString
(IASN1Encodable encodable) Cast ASN1 Encodable wrapper to DER Octet string wrapper.createDERSequence
(IASN1EncodableVector encodableVector) Create DER Sequence wrapper from ASN1 Encodable vector wrapper.createDERSequence
(IASN1Primitive primitive) Create DER Sequence wrapper from ASN1 Primitive wrapper.createDERSet
(IRecipientInfo recipientInfo) Create DER Set wrapper from recipient info wrapper.createDERSet
(ISignaturePolicyIdentifier identifier) Create DER Set wrapper from signature policy identifier wrapper.createDERSet
(IASN1EncodableVector encodableVector) Create DER Set wrapper from ASN1 Encodable vector wrapper.createDERSet
(IASN1Primitive primitive) Create DER Set wrapper from ASN1 Primitive wrapper.createDERTaggedObject
(boolean b, int i, IASN1Primitive primitive) Create DER Tagged object wrapper fromint
value,boolean
value and ASN1 Primitive wrapper.createDERTaggedObject
(int i, IASN1Primitive primitive) Create DER Tagged object wrapper fromint
value and ASN1 Primitive wrapper.Create distribution point name wrapper without parameters.createEncryptedContentInfo
(IASN1ObjectIdentifier data, IAlgorithmIdentifier algorithmIdentifier, IASN1OctetString octetString) Create encrypted content info wrapper from ASN1 Object identifier wrapper, algorithm identifier wrapper and ASN1 Octet string wrapper.createEnvelopedData
(IOriginatorInfo originatorInfo, IASN1Set set, IEncryptedContentInfo encryptedContentInfo, IASN1Set set1) Create enveloped data wrapper from originator info wrapper, ASN1 Set wrapper, encrypted content info wrapper and another ASN1 Set wrapper.createExtendedKeyUsage
(IKeyPurposeId purposeId) Create extended key usage wrapper from key purpose id wrapper.Create extension wrapper without parameters.createExtension
(IASN1ObjectIdentifier objectIdentifier, boolean critical, IASN1OctetString octetString) Create extension wrapper from ASN1 Object identifier wrapper,boolean
and ASN1 Octet string wrapper.createExtensions
(IExtension extension) Create extensions wrapper from extension wrapper.Create general name wrapper without parameters.createGeneralNames
(IASN1Encodable encodable) Cast ASN1 Encodable wrapper to general names wrapper.createIssuerAndSerialNumber
(IX500Name issuer, BigInteger value) Create issuer and serial number wrapper from X500 Name wrapper andBigInteger
.createJcaCertStore
(List<Certificate> certificates) Create Jca cert store wrapper fromList
ofCertificate
objects.createJcaContentSignerBuilder
(String algorithm) Create Jca content signer builder wrapper fromString
algorithm.Create Jca Content verifier provider builder wrapper without parameters.Create Jca Digest calculator provider builder wrapper without parameters.Create Jca PEM Key converter wrapper without parameters.createJcaSignerInfoGeneratorBuilder
(IDigestCalculatorProvider digestCalcProviderProvider) Create Jca signer info generator builder wrapper from digest calculator provider wrapper.Create Jca Simple signer info verifier builder wrapper without parameters.Create Jca X509 Certificate converter wrapper without parameters.createJcaX509CertificateHolder
(X509Certificate certificate) Create Jca X509 Certificate holder wrapper fromX509Certificate
.createJcaX509v3CertificateBuilder
(X509Certificate signingCert, BigInteger certSerialNumber, Date startDate, Date endDate, IX500Name subjectDnName, PublicKey publicKey) Create Jca X509 Version 3 certificate builder wrapper fromX509Certificate
,BigInteger
, startDate
, endDate
, X500 Name wrapper andPublicKey
.createJceKeyTransEnvelopedRecipient
(PrivateKey privateKey) Create Jce Key trans enveloped recipient wrapper fromPrivateKey
.Create Jce open SSL PKCS8 Decryptor provider builder wrapper without parameters.Create key purpose id wrapper without parameters.createKeyTransRecipientInfo
(IRecipientIdentifier recipientIdentifier, IAlgorithmIdentifier algorithmIdentifier, IASN1OctetString octetString) Create key trans recipient info wrapper from recipient identifier wrapper, algorithm identifier wrapper and ASN1 Octet string wrapper.Create key usage wrapper without parameters.createKeyUsage
(int i) Create key usage wrapper fromint
value.Create ASN1 Set wrapper which will storenull
.Createnull
asCRL
object.Create extensions wrapper fornull
value.Create originator info wrapper withnull
value.Create OCSP Object identifiers wrapper without parameters.createOCSPReq
(byte[] requestBytes) Create OCSP Req wrapper frombyte[]
.Create OCSP Req builder wrapper without parameters.Create OCSP Resp wrapper without parameters.createOCSPResp
(byte[] bytes) Create OCSP Resp wrapper frombyte[]
value.createOCSPResp
(IOCSPResponse ocspResponse) Create OCSP Resp wrapper from OCSP Response wrapper.Create OCSP Resp builder wrapper without parameters.Create OCSP Resp builder wrapper usinggetInstance
call.createOCSPResponse
(IOCSPResponseStatus respStatus, IResponseBytes responseBytes) Create OCSP Response wrapper from OCSP Response status wrapper and response bytes wrapper.Create OCSP Response status wrapper without parameters.createOCSPResponseStatus
(int status) Create OCSP Response status wrapper fromint
value.createOtherHashAlgAndValue
(IAlgorithmIdentifier algorithmIdentifier, IASN1OctetString octetString) Create other hash alg and value wrapper from algorithm identifier wrapper and ASN1 Octet string wrapper.createPEMParser
(Reader reader) Create PEM Parser wrapper fromReader
.Create PKCS Object identifiers wrapper without parameters.createRecipientIdentifier
(IIssuerAndSerialNumber issuerAndSerialNumber) Create recipient identifier wrapper from issuer and serial number wrapper.createRecipientInfo
(IKeyTransRecipientInfo keyTransRecipientInfo) Create recipient info wrapper from key trans recipient info wrapper.createRespID
(IX500Name x500Name) Create resp ID wrapper from X500 Name wrapper.createResponseBytes
(IASN1ObjectIdentifier asn1ObjectIdentifier, IDEROctetString derOctetString) Create response bytes wrapper from ASN1 Object identifier wrapper and DER Octet string wrapper.createRevokedStatus
(ICertificateStatus certificateStatus) Create revoked status wrapper from certificate status wrapper.createRevokedStatus
(Date date, int i) Create revoked status wrapper fromDate
andint
value.createRSASSAPSSParams
(IASN1Encodable encodable) Create a RSASSA-PSS params wrapper from an ASN1 Encodable wrapper.createRSASSAPSSParamsWithMGF1
(IASN1ObjectIdentifier digestAlgoOid, int saltLen, int trailerField) Create a RSASSA-PSS params wrapper from a digest algorithm OID, a salt length and a trailer field length.createSignaturePolicyId
(IASN1ObjectIdentifier objectIdentifier, IOtherHashAlgAndValue algAndValue) Create signature policy id wrapper from ASN1 Object identifier wrapper and other hash alg and value wrapper.createSignaturePolicyId
(IASN1ObjectIdentifier objectIdentifier, IOtherHashAlgAndValue algAndValue, ISigPolicyQualifierInfo... policyQualifiers) Create signature policy id wrapper from ASN1 Object identifier wrapper, other hash alg and value wrapper and sig policy qualifier info wrappers.Create signature policy identifier wrapper from signature policy id wrapper.createSigningCertificate
(IASN1Sequence sequence) Create signing certificate wrapper from ASN1 Sequence wrapper.createSigningCertificateV2
(IASN1Sequence sequence) Create signing certificate version 2 wrapper from ASN1 Sequence wrapper.createSigPolicyQualifierInfo
(IASN1ObjectIdentifier objectIdentifier, IDERIA5String string) Create sig policy qualifier info wrapper from ASN1 Object identifier wrapper and DERIA5 String wrapper.createSingleResp
(IBasicOCSPResponse basicResp) Create single resp wrapper from basic OCSP Response wrapper.Create subject public key info wrapper fromObject
.createTBSCertificate
(IASN1Encodable encodable) Create TBS Certificate wrapper from ASN1 Encodable wrapper.createTime
(Date date) Create time wrapper fromDate
.createTimeStampRequest
(byte[] bytes) Create timestamp request wrapper frombyte[]
value.Create timestamp request generator wrapper without parameters.createTimeStampResponse
(byte[] respBytes) Create timestamp response wrapper frombyte[]
value.createTimeStampResponseGenerator
(ITimeStampTokenGenerator tokenGenerator, Set<String> algorithms) Create timestamp response generator wrapper from timestamp token generator wrapper andSet
of algorithms.createTimeStampToken
(IContentInfo contentInfo) Create timestamp token wrapper from content info wrapper.createTimeStampTokenGenerator
(ISignerInfoGenerator siGen, IDigestCalculator dgCalc, IASN1ObjectIdentifier policy) Create timestamp token generator wrapper from signer info generator wrapper, digest calculator wrapper and ASN1 Object identifier wrapper.createTSTInfo
(IContentInfo contentInfo) Create TST Info wrapper from content info wrapper.Create unknown status wrapper without parameters.Create X500 Name wrapper fromString
.createX500Name
(X509Certificate certificate) Create X500 Name wrapper fromX509Certificate
.createX509Certificate
(Object element) CastObject
element toX509Certificate
.createX509CertificateHolder
(byte[] bytes) Create X509 Certificate holder wrapper frombyte[]
.createX509ExtensionUtils
(IDigestCalculator digestCalculator) Create X509 Extension utils wrapper from digest calculator wrapper.createX509v2CRLBuilder
(IX500Name x500Name, Date thisUpdate) Create X509 Version 2 CRL Builder wrapper from X500 Name wrapper andDate
.GetIBouncyCastleTestConstantsFactory
corresponding to thisIBouncyCastleFactory
.GetProvider
instance for this factory.GetString
which represents providers name for this factory.GetSecureRandom
implementation from the factory.void
isEncryptionFeatureSupported
(int encryptionAlgorithm, boolean withCertificate) Checks whether an algorithm is supported for encryption by the chosen Bouncy Castle implementation, throws an exception when not supported.boolean
Check if this bouncy-castle corresponding to this factory is in approved mode.boolean
isNullExtension
(IExtension extNonce) Checks if provided extension wrapper wrapsnull
.
-
Method Details
-
createASN1ObjectIdentifier
Cast ASN1 encodable wrapper to the ASN1 object identifier wrapper.- Parameters:
-
encodable
- wrapper to be cast - Returns:
- casted wrapper
-
createASN1ObjectIdentifier
Create ASN1 Object identifier wrapper fromString
.- Parameters:
-
str
-String
to create object identifier from - Returns:
- created object identifier
-
createASN1ObjectIdentifierInstance
Create ASN1 Object identifier wrapper fromObject
usinggetInstance
method call.- Parameters:
-
object
-Object
to create object identifier from - Returns:
- created object identifier
-
createASN1InputStream
Create ASN1 Input stream wrapper fromInputStream
.- Parameters:
-
stream
-InputStream
to create ASN1 Input stream from - Returns:
- created ASN1 Input stream
-
createASN1InputStream
Create ASN1 Input stream wrapper frombyte[]
.- Parameters:
-
bytes
-byte[]
to create ASN1 Input stream from - Returns:
- created ASN1 Input stream
-
createASN1OctetString
Cast ASN1 Encodable wrapper to the ASN1 Octet string wrapper.- Parameters:
-
encodable
- to be casted to ASN1 Octet string wrapper - Returns:
- casted ASN1 Octet string wrapper
-
createASN1OctetString
Create ASN1 Octet string wrapper from ASN1 Tagged object wrapper andboolean
parameter.- Parameters:
-
taggedObject
- ASN1 Tagged object wrapper to create ASN1 Octet string wrapper from -
b
- boolean to create ASN1 Octet string wrapper - Returns:
- created ASN1 Octet string wrapper
-
createASN1OctetString
Create ASN1 Octet string wrapper frombyte[]
.- Parameters:
-
bytes
-byte[]
to create ASN1 Octet string wrapper from - Returns:
- created ASN1 Octet string wrapper
-
createASN1Sequence
CastObject
to ASN1 Sequence wrapper.- Parameters:
-
object
-Object
to be cast. Must be instance of ASN1 Sequence - Returns:
- casted ASN1 Sequence wrapper
-
createASN1Sequence
Cast ASN1 encodable wrapper to the ASN1 Sequence wrapper.- Parameters:
-
encodable
- to be casted to ASN1 Sequence wrapper - Returns:
- casted ASN1 Sequence wrapper
-
createASN1Sequence
Create ASN1 Sequence wrapper frombyte[]
.- Parameters:
-
array
-byte[]
to create ASN1 Sequence wrapper from - Returns:
- created ASN1 Sequence wrapper
- Throws:
-
IOException
- if issues occur during ASN1 Sequence creation
-
createASN1SequenceInstance
Create ASN1 Sequence wrapper fromObject
usinggetInstance
method call.- Parameters:
-
object
-Object
to create ASN1 Sequence wrapper from - Returns:
- created ASN1 Sequence wrapper
-
createDERSequence
Create DER Sequence wrapper from ASN1 Encodable vector wrapper.- Parameters:
-
encodableVector
- ASN1 Encodable vector wrapper to create DER Sequence wrapper from - Returns:
- created DER Sequence wrapper
-
createDERSequence
Create DER Sequence wrapper from ASN1 Primitive wrapper.- Parameters:
-
primitive
- ASN1 Primitive wrapper to create DER Sequence wrapper from - Returns:
- created DER Sequence wrapper
-
createASN1TaggedObject
Create ASN1 Tagged object wrapper from ASN1 Encodable wrapper.- Parameters:
-
encodable
- ASN1 Encodable vector to create ASN1 Tagged object wrapper from - Returns:
- created ASN1 Tagged object wrapper
-
createASN1Integer
Cast ASN1 Encodable wrapper to ASN1 Integer wrapper.- Parameters:
-
encodable
- ASN1 Encodable wrapper to be cast - Returns:
- casted ASN1 Integer
-
createASN1Integer
Create ASN1 Integer wrapper fromint
.- Parameters:
-
i
-int
to create ASN1 Integer wrapper from - Returns:
- created ASN1 Integer wrapper
-
createASN1Integer
Create ASN1 Integer wrapper fromBigInteger
.- Parameters:
-
i
-BigInteger
to create ASN1 Integer wrapper from - Returns:
- created ASN1 Integer wrapper
-
createASN1Set
Cast ASN1 Encodable wrapper to ASN1 Set wrapper.- Parameters:
-
encodable
- ASN1 Encodable wrapper to be cast - Returns:
- casted ASN1 Set
-
createASN1Set
Create ASN1 Set wrapper fromObject
.- Parameters:
-
encodable
-Object
to create ASN1 Set wrapper from. Must be instance of ASN1 Set - Returns:
- created ASN1 Set wrapper
-
createASN1Set
Create ASN1 Set wrapper from ASN1 Tagged object wrapper andboolean
parameter.- Parameters:
-
taggedObject
- ASN1 Tagged object wrapper to create ASN1 Set wrapper from -
b
- boolean to create ASN1 Set wrapper - Returns:
- created ASN1 Set wrapper
-
createNullASN1Set
IASN1Set createNullASN1Set()Create ASN1 Set wrapper which will storenull
.- Returns:
-
ASN1 Set wrapper with
null
value
-
createASN1OutputStream
Create ASN1 Output stream wrapper fromOutputStream
.- Parameters:
-
stream
-OutputStream
to create ASN1 Output stream wrapper from - Returns:
- created ASN1 Output stream wrapper
-
createASN1OutputStream
Create ASN1 Output stream wrapper fromOutputStream
and ASN1 Encoding.- Parameters:
-
outputStream
-OutputStream
to create ASN1 Output stream wrapper from -
asn1Encoding
- ASN1 Encoding to be used - Returns:
- created ASN1 Output stream wrapper
-
createDEROctetString
Create DER Octet string wrapper frombyte[]
.- Parameters:
-
bytes
-byte[]
to create DER Octet string wrapper from - Returns:
- created DER Octet string wrapper
-
createDEROctetString
Cast ASN1 Encodable wrapper to DER Octet string wrapper.- Parameters:
-
encodable
- ASN1 Encodable wrapper to be casted - Returns:
- DER Octet string wrapper
-
createASN1EncodableVector
IASN1EncodableVector createASN1EncodableVector()Create ASN1 Encodable wrapper without parameters.- Returns:
- created ASN1 Encodable wrapper
-
createDERNull
IDERNull createDERNull()Create DER Null wrapper without parameters.- Returns:
- created DER Null wrapper
-
createDERTaggedObject
Create DER Tagged object wrapper fromint
value and ASN1 Primitive wrapper.- Parameters:
-
i
-int
value for DER Tagged object wrapper creation -
primitive
- ASN1 Primitive wrapper to create DER Tagged object wrapper from - Returns:
- created DER Tagged object wrapper
-
createDERTaggedObject
Create DER Tagged object wrapper fromint
value,boolean
value and ASN1 Primitive wrapper.- Parameters:
-
b
-boolean
value for DER Tagged object wrapper creation -
i
-int
value for DER Tagged object wrapper creation -
primitive
- ASN1 Primitive wrapper to create DER Tagged object wrapper from - Returns:
- created DER Tagged object wrapper
-
createDERSet
Create DER Set wrapper from ASN1 Encodable vector wrapper.- Parameters:
-
encodableVector
- ASN1 Encodable vector wrapper to create DER Set wrapper from - Returns:
- created DER Set wrapper
-
createDERSet
Create DER Set wrapper from ASN1 Primitive wrapper.- Parameters:
-
primitive
- ASN1 Primitive wrapper to create DER Set wrapper from - Returns:
- created DER Set wrapper
-
createDERSet
Create DER Set wrapper from signature policy identifier wrapper.- Parameters:
-
identifier
- signature policy identifier wrapper to create DER Set wrapper from - Returns:
- created DER Set wrapper
-
createDERSet
Create DER Set wrapper from recipient info wrapper.- Parameters:
-
recipientInfo
- recipient info wrapper to create DER Set wrapper from - Returns:
- created DER Set wrapper
-
createASN1Enumerated
Create ASN1 Enumerated wrapper fromint
value.- Parameters:
-
i
-int
to create ASN1 Enumerated wrapper from - Returns:
- created ASN1 Enumerated wrapper
-
createASN1Encoding
IASN1Encoding createASN1Encoding()Create ASN1 Encoding without parameters.- Returns:
- created ASN1 Encoding
-
createAttributeTable
Create attribute table wrapper from ASN1 Set wrapper.- Parameters:
-
unat
- ASN1 Set wrapper to create attribute table wrapper from - Returns:
- created attribute table wrapper
-
createPKCSObjectIdentifiers
IPKCSObjectIdentifiers createPKCSObjectIdentifiers()Create PKCS Object identifiers wrapper without parameters.- Returns:
- created PKCS Object identifiers
-
createAttribute
Create attribute wrapper from ASN1 Object identifier wrapper and ASN1 Set wrapper.- Parameters:
-
attrType
- ASN1 Object identifier wrapper to create attribute wrapper from -
attrValues
- ASN1 Object identifier wrapper to create attribute wrapper from - Returns:
- created attribute wrapper
-
createContentInfo
Create content info wrapper from ASN1 Sequence wrapper.- Parameters:
-
sequence
- ASN1 Sequence wrapper to create content info wrapper from - Returns:
- created content info wrapper
-
createContentInfo
Create content info wrapper from ASN1 Object identifier wrapper and ASN1 Encodable wrapper.- Parameters:
-
objectIdentifier
- ASN1 Object identifier wrapper to create content info wrapper from -
encodable
- ASN1 Encodable wrapper to create content info wrapper from - Returns:
- created content info wrapper
-
createTimeStampToken
ITimeStampToken createTimeStampToken(IContentInfo contentInfo) throws AbstractTSPException, IOException Create timestamp token wrapper from content info wrapper.- Parameters:
-
contentInfo
- content info wrapper to create timestamp token wrapper from - Returns:
- created timestamp token wrapper
- Throws:
-
AbstractTSPException
- if actual TSP Exception occurs during wrapper creation -
IOException
- if input-output exception occurs during wrapper creation
-
createSigningCertificate
Create signing certificate wrapper from ASN1 Sequence wrapper.- Parameters:
-
sequence
- ASN1 Sequence wrapper to create signing certificate wrapper from - Returns:
- created signing certificate wrapper
-
createSigningCertificateV2
Create signing certificate version 2 wrapper from ASN1 Sequence wrapper.- Parameters:
-
sequence
- ASN1 Sequence wrapper to create signing certificate version 2 wrapper from - Returns:
- created signing certificate version 2 wrapper
-
createBasicOCSPResponse
Create basic OCSP Response wrapper from ASN1 Primitive wrapper.- Parameters:
-
primitive
- ASN1 Primitive wrapper to create basic OCSP response wrapper from - Returns:
- created basic OCSP response wrapper
-
createBasicOCSPResp
Create basic OCSP Resp wrapper from basic OCSP Response wrapper.- Parameters:
-
response
- basic OCSP Response wrapper to create basic OCSP Resp wrapper from - Returns:
- created basic OCSP Resp wrapper
-
createBasicOCSPResp
Create basic OCSP Resp wrapper fromObject
.- Parameters:
-
response
-Object
to create basic OCSP Resp wrapper from. Must be actual basic OCSP Resp instance - Returns:
- created basic OCSP Resp wrapper
-
createOCSPObjectIdentifiers
IOCSPObjectIdentifiers createOCSPObjectIdentifiers()Create OCSP Object identifiers wrapper without parameters.- Returns:
- created OCSP Object identifiers wrapper
-
createAlgorithmIdentifier
Create algorithm identifier wrapper from ASN1 Object identifier wrapper.- Parameters:
-
algorithm
- ASN1 Object identifier wrapper to create algorithm identifier wrapper from - Returns:
- created algorithm identifier wrapper
-
createAlgorithmIdentifier
IAlgorithmIdentifier createAlgorithmIdentifier(IASN1ObjectIdentifier algorithm, IASN1Encodable parameters) Create algorithm identifier wrapper from ASN1 Object identifier wrapper and ASN1 Encodable wrapper for the parameters.- Parameters:
-
algorithm
- ASN1 Object identifier wrapper to create algorithm identifier wrapper from -
parameters
- ASN1 Encodable wrapper to create algorithm parameters. - Returns:
- created algorithm identifier wrapper
-
createRSASSAPSSParams
Create a RSASSA-PSS params wrapper from an ASN1 Encodable wrapper.- Parameters:
-
encodable
- ASN1 Encodable wrapper to create RSASSA-PSS params wrapper from - Returns:
- created RSASSA-PSS params wrapper
-
createRSASSAPSSParamsWithMGF1
IRSASSAPSSParams createRSASSAPSSParamsWithMGF1(IASN1ObjectIdentifier digestAlgoOid, int saltLen, int trailerField) Create a RSASSA-PSS params wrapper from a digest algorithm OID, a salt length and a trailer field length. The mask generation function will be set to MGF1, and the same digest algorithm will be used to populate the MGF parameters.- Parameters:
-
digestAlgoOid
- identifier of the digest algorithm to be used both in the MGF and in the signature -
saltLen
- salt length value -
trailerField
- trailer field value - Returns:
-
an
IRSASSAPSSParams
object initialised with the parameters supplied
-
getProvider
Provider getProvider()GetProvider
instance for this factory.- Returns:
-
Provider
instance
-
getProviderName
String getProviderName()GetString
which represents providers name for this factory.- Returns:
-
String
which represents providers name
-
createJceKeyTransEnvelopedRecipient
Create Jce Key trans enveloped recipient wrapper fromPrivateKey
.- Parameters:
-
privateKey
-PrivateKey
to create Jce Key trans enveloped recipient wrapper from - Returns:
- created Jce Key trans enveloped recipient wrapper
-
createJcaContentVerifierProviderBuilder
IJcaContentVerifierProviderBuilder createJcaContentVerifierProviderBuilder()Create Jca Content verifier provider builder wrapper without parameters.- Returns:
- created Jca Content verifier provider builder wrapper
-
createJcaSimpleSignerInfoVerifierBuilder
IJcaSimpleSignerInfoVerifierBuilder createJcaSimpleSignerInfoVerifierBuilder()Create Jca Simple signer info verifier builder wrapper without parameters.- Returns:
- created Jca Simple signer info verifier builder wrapper
-
createJcaX509CertificateConverter
IJcaX509CertificateConverter createJcaX509CertificateConverter()Create Jca X509 Certificate converter wrapper without parameters.- Returns:
- created Jca X509 Certificate converter wrapper
-
createJcaDigestCalculatorProviderBuilder
IJcaDigestCalculatorProviderBuilder createJcaDigestCalculatorProviderBuilder()Create Jca Digest calculator provider builder wrapper without parameters.- Returns:
- created Jca Digest calculator provider builder wrapper
-
createCertificateID
ICertificateID createCertificateID(IDigestCalculator digestCalculator, IX509CertificateHolder certificateHolder, BigInteger bigInteger) throws AbstractOCSPException Create certificate ID wrapper from digest calculator, X509 Certificate holder wrappers andBigInteger
.- Parameters:
-
digestCalculator
- digest calculator wrapper to create certificate ID wrapper from -
certificateHolder
- X509 Certificate holder wrapper to create certificate ID wrapper from -
bigInteger
-BigInteger
to create certificate ID wrapper from - Returns:
- created certificate ID wrapper
- Throws:
-
AbstractOCSPException
- if actual OCSP Exception occurs during wrapper creation
-
createCertificateID
ICertificateID createCertificateID()Create certificate ID wrapper without parameters.- Returns:
- created certificate ID wrapper
-
createX509CertificateHolder
Create X509 Certificate holder wrapper frombyte[]
.- Parameters:
-
bytes
-byte[]
value to create X509 Certificate holder wrapper from - Returns:
- created X509 Certificate holder wrapper
- Throws:
-
IOException
- if input-output exception occurs during wrapper creation
-
createJcaX509CertificateHolder
IJcaX509CertificateHolder createJcaX509CertificateHolder(X509Certificate certificate) throws CertificateEncodingException Create Jca X509 Certificate holder wrapper fromX509Certificate
.- Parameters:
-
certificate
-X509Certificate
to create Jca X509 Certificate holder wrapper from - Returns:
- created Jca X509 Certificate holder wrapper
- Throws:
-
CertificateEncodingException
- if certificate encoding exception occurs during wrapper creation
-
createExtension
IExtension createExtension(IASN1ObjectIdentifier objectIdentifier, boolean critical, IASN1OctetString octetString) Create extension wrapper from ASN1 Object identifier wrapper,boolean
and ASN1 Octet string wrapper.- Parameters:
-
objectIdentifier
- ASN1 Object identifier wrapper to create extension wrapper from -
critical
-boolean
to create extension wrapper -
octetString
- ASN1 Octet string wrapper to create extension wrapper from - Returns:
- created extension wrapper
-
createExtension
IExtension createExtension()Create extension wrapper without parameters.- Returns:
- created extension wrapper
-
createExtensions
Create extensions wrapper from extension wrapper.- Parameters:
-
extension
- extension wrapper to create extensions wrapper from - Returns:
- created extensions wrapper
-
createNullExtensions
IExtensions createNullExtensions()Create extensions wrapper fornull
value.- Returns:
- created extensions wrapper
-
createOCSPReqBuilder
IOCSPReqBuilder createOCSPReqBuilder()Create OCSP Req builder wrapper without parameters.- Returns:
- created OCSP Req builder wrapper
-
createSigPolicyQualifierInfo
ISigPolicyQualifierInfo createSigPolicyQualifierInfo(IASN1ObjectIdentifier objectIdentifier, IDERIA5String string) Create sig policy qualifier info wrapper from ASN1 Object identifier wrapper and DERIA5 String wrapper.- Parameters:
-
objectIdentifier
- ASN1 Object identifier wrapper to create sig policy qualifier info wrapper from -
string
- DERIA5 String wrapper to create sig policy qualifier info wrapper from - Returns:
- created sig policy qualifier info wrapper
-
createASN1String
Cast ASN1 Encodable wrapper to ASN1 String wrapper.- Parameters:
-
encodable
- ASN1 Encodable wrapper to be cast - Returns:
- casted ASN1 String wrapper
-
createASN1Primitive
Cast ASN1 Encodable wrapper to ASN1 Primitive wrapper.- Parameters:
-
encodable
- ASN1 Encodable wrapper to be cast - Returns:
- casted ASN1 Primitive wrapper
-
createASN1Primitive
Create ASN1 Primitive wrapper frombyte[]
value.- Parameters:
-
array
-byte[]
value to create ASN1 Primitive wrapper from - Returns:
- created ASN1 Primitive wrapper
- Throws:
-
IOException
- if input-output exception occurs during creation
-
createOCSPResp
Create OCSP Resp wrapper from OCSP Response wrapper.- Parameters:
-
ocspResponse
- OCSP Response wrapper to create OCSP Resp wrapper from - Returns:
- created OCSP Resp wrapper
-
createOCSPResp
Create OCSP Resp wrapper frombyte[]
value.- Parameters:
-
bytes
-byte[]
value to create OCSP Resp wrapper from - Returns:
- created OCSP Resp wrapper
- Throws:
-
IOException
- if input-output exception occurs during creation
-
createOCSPResp
IOCSPResp createOCSPResp()Create OCSP Resp wrapper without parameters.- Returns:
- created OCSP Resp wrapper
-
createOCSPResponse
Create OCSP Response wrapper from OCSP Response status wrapper and response bytes wrapper.- Parameters:
-
respStatus
- OCSP Response status wrapper to create OCSP Response wrapper from -
responseBytes
- response bytes wrapper to create OCSP Response wrapper from - Returns:
- created OCSP Response wrapper
-
createResponseBytes
IResponseBytes createResponseBytes(IASN1ObjectIdentifier asn1ObjectIdentifier, IDEROctetString derOctetString) Create response bytes wrapper from ASN1 Object identifier wrapper and DER Octet string wrapper.- Parameters:
-
asn1ObjectIdentifier
- ASN1 Object identifier wrapper to create response bytes wrapper from -
derOctetString
- DER Octet string wrapper to create response bytes wrapper from - Returns:
- created response bytes wrapper
-
createOCSPRespBuilderInstance
IOCSPRespBuilder createOCSPRespBuilderInstance()Create OCSP Resp builder wrapper usinggetInstance
call.- Returns:
- created OCSP Resp builder wrapper
-
createOCSPRespBuilder
IOCSPRespBuilder createOCSPRespBuilder()Create OCSP Resp builder wrapper without parameters.- Returns:
- created OCSP Resp builder wrapper
-
createOCSPResponseStatus
Create OCSP Response status wrapper fromint
value.- Parameters:
-
status
-int
value to create OCSP Response status wrapper from - Returns:
- created OCSP Response status wrapper
-
createOCSPResponseStatus
IOCSPResponseStatus createOCSPResponseStatus()Create OCSP Response status wrapper without parameters.- Returns:
- created OCSP Response status wrapper
-
createCertificateStatus
ICertificateStatus createCertificateStatus()Create certificate status wrapper without parameters.- Returns:
- created certificate status wrapper
-
createRevokedStatus
Create revoked status wrapper from certificate status wrapper.- Parameters:
-
certificateStatus
- certificate status wrapper to create revoked status wrapper from - Returns:
- created revoked status wrapper
-
createRevokedStatus
Create revoked status wrapper fromDate
andint
value.- Parameters:
-
date
-Date
to create revoked status wrapper from -
i
-int
value to create revoked status wrapper from - Returns:
- created revoked status wrapper
-
createDERIA5String
Create DERIA5 String wrapper from ASN1 Tagged object wrapper andboolean
value.- Parameters:
-
taggedObject
- ASN1 Tagged object wrapper to create DERIA5 String wrapper from -
b
-boolean
value to create DERIA5 String wrapper from - Returns:
- created DERIA5 String wrapper
-
createDERIA5String
Create DERIA5 String wrapper fromString
value.- Parameters:
-
str
-String
value to create DERIA5 String wrapper from - Returns:
- created DERIA5 String wrapper
-
createCRLDistPoint
Create CRL Dist point wrapper fromObject
.- Parameters:
-
object
-Object
to create CRL Dist point wrapper from - Returns:
- created CRL Dist point wrapper
-
createDistributionPointName
IDistributionPointName createDistributionPointName()Create distribution point name wrapper without parameters.- Returns:
- created distribution point name wrapper
-
createGeneralNames
Cast ASN1 Encodable wrapper to general names wrapper.- Parameters:
-
encodable
- ASN1 Encodable wrapper to be cast - Returns:
- casted general names wrapper
-
createGeneralName
IGeneralName createGeneralName()Create general name wrapper without parameters.- Returns:
- created general name wrapper
-
createOtherHashAlgAndValue
IOtherHashAlgAndValue createOtherHashAlgAndValue(IAlgorithmIdentifier algorithmIdentifier, IASN1OctetString octetString) Create other hash alg and value wrapper from algorithm identifier wrapper and ASN1 Octet string wrapper.- Parameters:
-
algorithmIdentifier
- algorithm identifier wrapper to create other hash alg and value wrapper from -
octetString
- ASN1 Octet string wrapper to create other hash alg and value wrapper from - Returns:
- created other hash alg and value wrapper
-
createSignaturePolicyId
ISignaturePolicyId createSignaturePolicyId(IASN1ObjectIdentifier objectIdentifier, IOtherHashAlgAndValue algAndValue) Create signature policy id wrapper from ASN1 Object identifier wrapper and other hash alg and value wrapper.- Parameters:
-
objectIdentifier
- ASN1 Object identifier wrapper to create signature policy id wrapper from -
algAndValue
- other hash alg and value wrapper to create signature policy id wrapper from - Returns:
- created signature policy id wrapper
-
createSignaturePolicyId
ISignaturePolicyId createSignaturePolicyId(IASN1ObjectIdentifier objectIdentifier, IOtherHashAlgAndValue algAndValue, ISigPolicyQualifierInfo... policyQualifiers) Create signature policy id wrapper from ASN1 Object identifier wrapper, other hash alg and value wrapper and sig policy qualifier info wrappers.- Parameters:
-
objectIdentifier
- ASN1 Object identifier wrapper to create signature policy id wrapper from -
algAndValue
- other hash alg and value wrapper to create signature policy id wrapper from -
policyQualifiers
- sig policy qualifier info wrappers to create signature policy id wrapper from - Returns:
- created signature policy id wrapper
-
createSignaturePolicyIdentifier
Create signature policy identifier wrapper from signature policy id wrapper.- Parameters:
-
policyId
- signature policy id wrapper to create signature policy identifier wrapper from - Returns:
- created signature policy identifier wrapper
-
createEnvelopedData
IEnvelopedData createEnvelopedData(IOriginatorInfo originatorInfo, IASN1Set set, IEncryptedContentInfo encryptedContentInfo, IASN1Set set1) Create enveloped data wrapper from originator info wrapper, ASN1 Set wrapper, encrypted content info wrapper and another ASN1 Set wrapper.- Parameters:
-
originatorInfo
- originator info wrapper to create enveloped data wrapper from -
set
- ASN1 Set wrapper to create enveloped data wrapper from -
encryptedContentInfo
- encrypted content info wrapper to create enveloped data wrapper from -
set1
- ASN1 Set wrapper to create enveloped data wrapper from - Returns:
- created enveloped data wrapper
-
createRecipientInfo
Create recipient info wrapper from key trans recipient info wrapper.- Parameters:
-
keyTransRecipientInfo
- key trans recipient info wrapper to create recipient info wrapper from - Returns:
- created recipient info wrapper
-
createEncryptedContentInfo
IEncryptedContentInfo createEncryptedContentInfo(IASN1ObjectIdentifier data, IAlgorithmIdentifier algorithmIdentifier, IASN1OctetString octetString) Create encrypted content info wrapper from ASN1 Object identifier wrapper, algorithm identifier wrapper and ASN1 Octet string wrapper.- Parameters:
-
data
- ASN1 Object identifier wrapper to create encrypted content info wrapper from -
algorithmIdentifier
- algorithm identifier wrapper to create encrypted content info wrapper from -
octetString
- ASN1 Octet string wrapper to create encrypted content info wrapper from - Returns:
- created encrypted content info wrapper
-
createTBSCertificate
Create TBS Certificate wrapper from ASN1 Encodable wrapper.- Parameters:
-
encodable
- ASN1 Encodable wrapper to create TBS Certificate wrapper from - Returns:
- created TBS Certificate wrapper
-
createIssuerAndSerialNumber
Create issuer and serial number wrapper from X500 Name wrapper andBigInteger
.- Parameters:
-
issuer
- X500 Name wrapper to create issuer and serial number wrapper from -
value
-BigInteger
to create issuer and serial number wrapper from - Returns:
- created issuer and serial number wrapper
-
createRecipientIdentifier
Create recipient identifier wrapper from issuer and serial number wrapper.- Parameters:
-
issuerAndSerialNumber
- issuer and serial number wrapper to create recipient identifier wrapper from - Returns:
- created recipient identifier wrapper
-
createKeyTransRecipientInfo
IKeyTransRecipientInfo createKeyTransRecipientInfo(IRecipientIdentifier recipientIdentifier, IAlgorithmIdentifier algorithmIdentifier, IASN1OctetString octetString) Create key trans recipient info wrapper from recipient identifier wrapper, algorithm identifier wrapper and ASN1 Octet string wrapper.- Parameters:
-
recipientIdentifier
- recipient identifier wrapper to create key trans recipient info wrapper from -
algorithmIdentifier
- algorithm identifier wrapper to create key trans recipient info wrapper from -
octetString
- ASN1 Octet string wrapper to create key trans recipient info wrapper from - Returns:
- created key trans recipient info wrapper
-
createNullOriginatorInfo
IOriginatorInfo createNullOriginatorInfo()Create originator info wrapper withnull
value.- Returns:
- created originator info wrapper
-
createCMSEnvelopedData
Create CMS enveloped data frombyte[]
value.- Parameters:
-
valueBytes
-byte[]
value to create CMS enveloped data from - Returns:
- created CMS enveloped data
- Throws:
-
AbstractCMSException
- if actual CMS Exception occurs during creation.
-
createTimeStampRequestGenerator
ITimeStampRequestGenerator createTimeStampRequestGenerator()Create timestamp request generator wrapper without parameters.- Returns:
- created timestamp request generator wrapper
-
createTimeStampResponse
ITimeStampResponse createTimeStampResponse(byte[] respBytes) throws AbstractTSPException, IOException Create timestamp response wrapper frombyte[]
value.- Parameters:
-
respBytes
-byte[]
value to create timestamp response wrapper from - Returns:
- created timestamp response wrapper
- Throws:
-
AbstractTSPException
- if actual TSP Exception was thrown during wrapper creation -
IOException
- if input-output exception occurs during creation
-
createAbstractOCSPException
Create OCSP Exception wrapper from usualException
.- Parameters:
-
e
-Exception
to create OCSP Exception wrapper from - Returns:
- created OCSP Exception wrapper
-
createUnknownStatus
IUnknownStatus createUnknownStatus()Create unknown status wrapper without parameters.- Returns:
- created unknown status wrapper
-
createASN1Dump
IASN1Dump createASN1Dump()Create ASN1 Dump wrapper without parameters.- Returns:
- created ASN1 Dump wrapper
-
createASN1BitString
Cast ASN1 Encodable wrapper to ASN1 Bit string wrapper.- Parameters:
-
encodable
- ASN1 Encodable wrapper to be cast - Returns:
- casted ASN1 Bit string wrapper
-
createASN1GeneralizedTime
Cast ASN1 Encodable wrapper to ASN1 Generalized time wrapper.- Parameters:
-
encodable
- ASN1 Encodable wrapper to be cast - Returns:
- casted ASN1 Generalized time wrapper
-
createASN1UTCTime
Cast ASN1 Encodable wrapper to ASN1 UTC Time wrapper.- Parameters:
-
encodable
- ASN1 Encodable wrapper to be cast - Returns:
- casted ASN1 UTC Time wrapper
-
createJcaCertStore
IJcaCertStore createJcaCertStore(List<Certificate> certificates) throws CertificateEncodingException Create Jca cert store wrapper fromList
ofCertificate
objects.- Parameters:
-
certificates
-List
ofCertificate
objects to create Jca cert store wrapper from - Returns:
- created Jca cert store wrapper
- Throws:
-
CertificateEncodingException
- if certificate encoding exception occurs during wrapper creation
-
createTimeStampResponseGenerator
ITimeStampResponseGenerator createTimeStampResponseGenerator(ITimeStampTokenGenerator tokenGenerator, Set<String> algorithms) Create timestamp response generator wrapper from timestamp token generator wrapper andSet
of algorithms.- Parameters:
-
tokenGenerator
- timestamp token generator wrapper to create timestamp response generator wrapper from -
algorithms
-Set
of algorithms to create timestamp response generator wrapper from - Returns:
- created timestamp response generator wrapper
-
createTimeStampRequest
Create timestamp request wrapper frombyte[]
value.- Parameters:
-
bytes
-byte[]
value to create timestamp request wrapper from - Returns:
- created timestamp request wrapper
- Throws:
-
IOException
- if input-output exception occurs during creation
-
createJcaContentSignerBuilder
Create Jca content signer builder wrapper fromString
algorithm.- Parameters:
-
algorithm
-String
algorithm to create Jca content signer builder wrapper from - Returns:
- created Jca content signer builder wrapper
-
createJcaSignerInfoGeneratorBuilder
IJcaSignerInfoGeneratorBuilder createJcaSignerInfoGeneratorBuilder(IDigestCalculatorProvider digestCalcProviderProvider) Create Jca signer info generator builder wrapper from digest calculator provider wrapper.- Parameters:
-
digestCalcProviderProvider
- digest calculator provider wrapper to create builder wrapper from - Returns:
- created Jca signer info generator builder wrapper
-
createTimeStampTokenGenerator
ITimeStampTokenGenerator createTimeStampTokenGenerator(ISignerInfoGenerator siGen, IDigestCalculator dgCalc, IASN1ObjectIdentifier policy) throws AbstractTSPException Create timestamp token generator wrapper from signer info generator wrapper, digest calculator wrapper and ASN1 Object identifier wrapper.- Parameters:
-
siGen
- signer info generator wrapper to create timestamp token generator wrapper from -
dgCalc
- digest calculator wrapper to create timestamp token generator wrapper from -
policy
- ASN1 Object identifier wrapper to create timestamp token generator wrapper from - Returns:
- created timestamp token generator wrapper
- Throws:
-
AbstractTSPException
- if actual TSP Exception occurs during wrapper creation
-
createX500Name
Create X500 Name wrapper fromX509Certificate
.- Parameters:
-
certificate
-X509Certificate
to create X500 Name wrapper from - Returns:
- created X500 Name wrapper
- Throws:
-
CertificateEncodingException
- if certificate encoding exception occurs during wrapper creation
-
createX500Name
Create X500 Name wrapper fromString
.- Parameters:
-
s
-String
to create X500 Name wrapper from - Returns:
- created X500 Name wrapper
-
createRespID
Create resp ID wrapper from X500 Name wrapper.- Parameters:
-
x500Name
- X500 Name wrapper to create resp ID wrapper from - Returns:
- created resp ID wrapper
-
createBasicOCSPRespBuilder
Create basic OCSP Resp builder wrapper from resp ID wrapper.- Parameters:
-
respID
- resp ID wrapper to create basic OCSP Resp builder wrapper from - Returns:
- created basic OCSP Resp builder wrapper
-
createOCSPReq
Create OCSP Req wrapper frombyte[]
.- Parameters:
-
requestBytes
-byte[]
to create OCSP Req wrapper from - Returns:
- created OCSP Req wrapper
- Throws:
-
IOException
- if input-output exception occurs during creation
-
createX509v2CRLBuilder
Create X509 Version 2 CRL Builder wrapper from X500 Name wrapper andDate
.- Parameters:
-
x500Name
- X500 Name wrapper to create X509 Version 2 CRL Builder wrapper from -
thisUpdate
-Date
to create X509 Version 2 CRL Builder wrapper from - Returns:
- created X509 Version 2 CRL Builder wrapper
-
createJcaX509v3CertificateBuilder
IJcaX509v3CertificateBuilder createJcaX509v3CertificateBuilder(X509Certificate signingCert, BigInteger certSerialNumber, Date startDate, Date endDate, IX500Name subjectDnName, PublicKey publicKey) Create Jca X509 Version 3 certificate builder wrapper fromX509Certificate
,BigInteger
, startDate
, endDate
, X500 Name wrapper andPublicKey
.- Parameters:
-
signingCert
-X509Certificate
to create Jca X509 Version 3 certificate builder wrapper from -
certSerialNumber
-BigInteger
to create Jca X509 Version 3 certificate builder wrapper from -
startDate
- startDate
to create Jca X509 Version 3 certificate builder wrapper from -
endDate
- endDate
to create Jca X509 Version 3 certificate builder wrapper from -
subjectDnName
- X500 Name wrapper to create Jca X509 Version 3 certificate builder wrapper from -
publicKey
-PublicKey
to create Jca X509 Version 3 certificate builder wrapper from - Returns:
- created Jca X509 Version 3 certificate builder wrapper
-
createBasicConstraints
Create basic constraints wrapper fromboolean
value.- Parameters:
-
b
-boolean
value to create basic constraints wrapper from - Returns:
- created basic constraints wrapper
-
createKeyUsage
IKeyUsage createKeyUsage()Create key usage wrapper without parameters.- Returns:
- created key usage wrapper
-
createKeyUsage
Create key usage wrapper fromint
value.- Parameters:
-
i
-int
value to create key usage wrapper from - Returns:
- created key usage wrapper
-
createKeyPurposeId
IKeyPurposeId createKeyPurposeId()Create key purpose id wrapper without parameters.- Returns:
- created key purpose id wrapper
-
createExtendedKeyUsage
Create extended key usage wrapper from key purpose id wrapper.- Parameters:
-
purposeId
- key purpose id wrapper to create extended key usage wrapper from - Returns:
- created extended key usage wrapper
-
createX509ExtensionUtils
Create X509 Extension utils wrapper from digest calculator wrapper.- Parameters:
-
digestCalculator
- digest calculator wrapper to create X509 Extension utils wrapper from - Returns:
- created X509 Extension utils wrapper
-
createSubjectPublicKeyInfo
Create subject public key info wrapper fromObject
.- Parameters:
-
obj
-Object
to create subject public ket info wrapper from - Returns:
- created subject public ket info wrapper
-
createCRLReason
ICRLReason createCRLReason()Create CRL Reason wrapper without parameters.- Returns:
- created CRL Reason wrapper
-
createTSTInfo
Create TST Info wrapper from content info wrapper.- Parameters:
-
contentInfo
- content info wrapper to create TST Info wrapper from - Returns:
- created TST Info wrapper
- Throws:
-
AbstractTSPException
- if actual TSP Exception occurs during wrapper creation -
IOException
- if input-output exception occurs during creation
-
createSingleResp
Create single resp wrapper from basic OCSP Response wrapper.- Parameters:
-
basicResp
- basic OCSP Response wrapper to create single resp wrapper from - Returns:
- created single resp wrapper
-
createX509Certificate
CastObject
element toX509Certificate
.- Parameters:
-
element
-Object
to be cast - Returns:
-
casted
X509Certificate
-
getBouncyCastleFactoryTestUtil
IBouncyCastleTestConstantsFactory getBouncyCastleFactoryTestUtil()GetIBouncyCastleTestConstantsFactory
corresponding to thisIBouncyCastleFactory
.- Returns:
-
IBouncyCastleTestConstantsFactory
instance
-
createNullCrl
CRL createNullCrl()Createnull
asCRL
object.- Returns:
-
null
asCRL
object
-
createPEMParser
Create PEM Parser wrapper fromReader
.- Parameters:
-
reader
-Reader
to create PEM Parser wrapper from - Returns:
- created PEM Parser wrapper
-
createJceOpenSSLPKCS8DecryptorProviderBuilder
IJceOpenSSLPKCS8DecryptorProviderBuilder createJceOpenSSLPKCS8DecryptorProviderBuilder()Create Jce open SSL PKCS8 Decryptor provider builder wrapper without parameters.- Returns:
- created Jce open SSL PKCS8 Decryptor provider builder wrapper
-
createJcaPEMKeyConverter
IJcaPEMKeyConverter createJcaPEMKeyConverter()Create Jca PEM Key converter wrapper without parameters.- Returns:
- created Jca PEM Key converter wrapper
-
createTime
Create time wrapper fromDate
.- Parameters:
-
date
-Date
to create time wrapper from - Returns:
- created time wrapper
-
isNullExtension
Checks if provided extension wrapper wrapsnull
.- Parameters:
-
extNonce
- extension wrapper to check - Returns:
-
true
if provided extension wrapper wrapsnull
,false
otherwise
-
getSecureRandom
SecureRandom getSecureRandom()GetSecureRandom
implementation from the factory.- Returns:
-
SecureRandom
implementation
-
isInApprovedOnlyMode
boolean isInApprovedOnlyMode()Check if this bouncy-castle corresponding to this factory is in approved mode.- Returns:
-
true
if approved mode is enabled,false
otherwise
-
createCipherBytes
byte[] createCipherBytes(X509Certificate x509certificate, byte[] abyte0, IAlgorithmIdentifier algorithmIdentifier) throws GeneralSecurityException Create cipher bytes fromX509Certificate
,byte[]
value and algorithm identifier wrapper.- Parameters:
-
x509certificate
-X509Certificate
to create cipher bytes from -
abyte0
-byte[]
value to create cipher bytes from -
algorithmIdentifier
- algorithm identifier wrapper to create cipher bytes from - Returns:
-
byte[]
representing created cipher bytes - Throws:
-
GeneralSecurityException
- if general security exception occurs during cipher bytes creation
-
isEncryptionFeatureSupported
void isEncryptionFeatureSupported(int encryptionAlgorithm, boolean withCertificate) Checks whether an algorithm is supported for encryption by the chosen Bouncy Castle implementation, throws an exception when not supported.- Parameters:
-
encryptionAlgorithm
- the type of encryption. It can be one of STANDARD_ENCRYPTION_40 = 0 STANDARD_ENCRYPTION_128 = 1, ENCRYPTION_AES_128 = 2 ENCRYPTION_AES_256 = 3 in combination with (or-ed) DO_NOT_ENCRYPT_METADATA = 8 and EMBEDDED_FILES_ONLY = 24 -
withCertificate
- true when used with a certificate, false otherwise
-