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 Details

    • getAlgorithmOid

      String getAlgorithmOid (String name)
      Get signing algorithm oid from its name.
      Parameters:
      name - name of the algorithm
      Returns:
      algorithm oid
    • getDigestAlgorithmOid

      String getDigestAlgorithmOid (String name)
      Get hash algorithm oid from its name.
      Parameters:
      name - name of the algorithm
      Returns:
      algorithm oid
    • getAlgorithmName

      String getAlgorithmName (String oid)
      Get signing algorithm name from its oid.
      Parameters:
      oid - oid of the algorithm
      Returns:
      algorithm name
    • createASN1ObjectIdentifier

      IASN1ObjectIdentifier createASN1ObjectIdentifier (IASN1Encodable encodable)
      Cast ASN1 encodable wrapper to the ASN1 object identifier wrapper.
      Parameters:
      encodable - wrapper to be cast
      Returns:
      casted wrapper
    • createASN1ObjectIdentifier

      IASN1ObjectIdentifier createASN1ObjectIdentifier (String str)
      Create ASN1 Object identifier wrapper from String.
      Parameters:
      str - String to create object identifier from
      Returns:
      created object identifier
    • createASN1ObjectIdentifierInstance

      IASN1ObjectIdentifier createASN1ObjectIdentifierInstance (Object object)
      Create ASN1 Object identifier wrapper from Object using getInstance method call.
      Parameters:
      object - Object to create object identifier from
      Returns:
      created object identifier
    • createASN1InputStream

      IASN1InputStream createASN1InputStream (InputStream stream)
      Create ASN1 Input stream wrapper from InputStream.
      Parameters:
      stream - InputStream to create ASN1 Input stream from
      Returns:
      created ASN1 Input stream
    • createASN1InputStream

      IASN1InputStream createASN1InputStream (byte[] bytes)
      Create ASN1 Input stream wrapper from byte[].
      Parameters:
      bytes - byte[] to create ASN1 Input stream from
      Returns:
      created ASN1 Input stream
    • createASN1OctetString

      IASN1OctetString createASN1OctetString (IASN1Encodable encodable)
      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

      IASN1OctetString createASN1OctetString (IASN1TaggedObject taggedObject, boolean b)
      Create ASN1 Octet string wrapper from ASN1 Tagged object wrapper and boolean 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

      IASN1OctetString createASN1OctetString (byte[] bytes)
      Create ASN1 Octet string wrapper from byte[].
      Parameters:
      bytes - byte[] to create ASN1 Octet string wrapper from
      Returns:
      created ASN1 Octet string wrapper
    • createASN1Sequence

      IASN1Sequence createASN1Sequence (Object object)
      Cast Object to ASN1 Sequence wrapper.
      Parameters:
      object - Object to be cast. Must be instance of ASN1 Sequence
      Returns:
      casted ASN1 Sequence wrapper
    • createASN1Sequence

      IASN1Sequence createASN1Sequence (IASN1Encodable encodable)
      Cast ASN1 encodable wrapper to the ASN1 Sequence wrapper.
      Parameters:
      encodable - to be casted to ASN1 Sequence wrapper
      Returns:
      casted ASN1 Sequence wrapper
    • createASN1Sequence

      IASN1Sequence createASN1Sequence (byte[] array) throws IOException
      Create ASN1 Sequence wrapper from byte[].
      Parameters:
      array - byte[] to create ASN1 Sequence wrapper from
      Returns:
      created ASN1 Sequence wrapper
      Throws:
      IOException - if issues occur during ASN1 Sequence creation
    • createASN1SequenceInstance

      IASN1Sequence createASN1SequenceInstance (Object object)
      Create ASN1 Sequence wrapper from Object using getInstance method call.
      Parameters:
      object - Object to create ASN1 Sequence wrapper from
      Returns:
      created ASN1 Sequence wrapper
    • createDERSequence

      IDERSequence createDERSequence (IASN1EncodableVector encodableVector)
      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

      IDERSequence createDERSequence (IASN1Primitive primitive)
      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

      IASN1TaggedObject createASN1TaggedObject (IASN1Encodable encodable)
      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

      IASN1Integer createASN1Integer (IASN1Encodable encodable)
      Cast ASN1 Encodable wrapper to ASN1 Integer wrapper.
      Parameters:
      encodable - ASN1 Encodable wrapper to be cast
      Returns:
      casted ASN1 Integer
    • createASN1Integer

      IASN1Integer createASN1Integer (int i)
      Create ASN1 Integer wrapper from int.
      Parameters:
      i - int to create ASN1 Integer wrapper from
      Returns:
      created ASN1 Integer wrapper
    • createASN1Integer

      IASN1Integer createASN1Integer (BigInteger i)
      Create ASN1 Integer wrapper from BigInteger.
      Parameters:
      i - BigInteger to create ASN1 Integer wrapper from
      Returns:
      created ASN1 Integer wrapper
    • createASN1Set

      IASN1Set createASN1Set (IASN1Encodable encodable)
      Cast ASN1 Encodable wrapper to ASN1 Set wrapper.
      Parameters:
      encodable - ASN1 Encodable wrapper to be cast
      Returns:
      casted ASN1 Set
    • createASN1Set

      IASN1Set createASN1Set (Object encodable)
      Create ASN1 Set wrapper from Object.
      Parameters:
      encodable - Object to create ASN1 Set wrapper from. Must be instance of ASN1 Set
      Returns:
      created ASN1 Set wrapper
    • createASN1Set

      IASN1Set createASN1Set (IASN1TaggedObject taggedObject, boolean b)
      Create ASN1 Set wrapper from ASN1 Tagged object wrapper and boolean 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 store null.
      Returns:
      ASN1 Set wrapper with null value
    • createASN1OutputStream

      IASN1OutputStream createASN1OutputStream (OutputStream stream)
      Create ASN1 Output stream wrapper from OutputStream.
      Parameters:
      stream - OutputStream to create ASN1 Output stream wrapper from
      Returns:
      created ASN1 Output stream wrapper
    • createASN1OutputStream

      IASN1OutputStream createASN1OutputStream (OutputStream outputStream, String asn1Encoding)
      Create ASN1 Output stream wrapper from OutputStream 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

      IDEROctetString createDEROctetString (byte[] bytes)
      Create DER Octet string wrapper from byte[].
      Parameters:
      bytes - byte[] to create DER Octet string wrapper from
      Returns:
      created DER Octet string wrapper
    • createDEROctetString

      IDEROctetString createDEROctetString (IASN1Encodable encodable)
      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

      IDERTaggedObject createDERTaggedObject (int i, IASN1Primitive primitive)
      Create DER Tagged object wrapper from int 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

      IDERTaggedObject createDERTaggedObject (boolean b, int i, IASN1Primitive primitive)
      Create DER Tagged object wrapper from int 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

      IDERSet createDERSet (IASN1EncodableVector encodableVector)
      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

      IDERSet createDERSet (IASN1Primitive primitive)
      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

      IDERSet createDERSet (ISignaturePolicyIdentifier identifier)
      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

      IDERSet createDERSet (IRecipientInfo recipientInfo)
      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

      IASN1Enumerated createASN1Enumerated (int i)
      Create ASN1 Enumerated wrapper from int value.
      Parameters:
      i - int to create ASN1 Enumerated wrapper from
      Returns:
      created ASN1 Enumerated wrapper
    • createASN1Enumerated

      IASN1Enumerated createASN1Enumerated (IASN1Encodable object)
      Create ASN1 Enumerated wrapper from IASN1Encodable value.
      Parameters:
      object - IASN1Encodable to create ASN1 Enumerated wrapper from
      Returns:
      created ASN1 Enumerated wrapper.
    • createASN1Encoding

      IASN1Encoding createASN1Encoding()
      Create ASN1 Encoding without parameters.
      Returns:
      created ASN1 Encoding
    • createAttributeTable

      IAttributeTable createAttributeTable (IASN1Set unat)
      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

      IAttribute createAttribute (IASN1ObjectIdentifier attrType, IASN1Set attrValues)
      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

      IContentInfo createContentInfo (IASN1Sequence sequence)
      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

      IContentInfo createContentInfo (IASN1ObjectIdentifier objectIdentifier, IASN1Encodable encodable)
      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

      ISigningCertificate createSigningCertificate (IASN1Sequence sequence)
      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

      ISigningCertificateV2 createSigningCertificateV2 (IASN1Sequence sequence)
      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

      IBasicOCSPResponse createBasicOCSPResponse (IASN1Primitive primitive)
      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
    • createBasicOCSPResponse

      IBasicOCSPResponse createBasicOCSPResponse (byte[] bytes)
      Create basic OCSP Response wrapper from byte[] array.
      Parameters:
      bytes - byte[] array to create basic OCSP response wrapper from
      Returns:
      created basic OCSP response wrapper
    • createBasicOCSPResp

      IBasicOCSPResp createBasicOCSPResp (IBasicOCSPResponse response)
      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

      IBasicOCSPResp createBasicOCSPResp (Object response)
      Create basic OCSP Resp wrapper from Object.
      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

      IAlgorithmIdentifier createAlgorithmIdentifier (IASN1ObjectIdentifier algorithm)
      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

      IRSASSAPSSParams createRSASSAPSSParams (IASN1Encodable encodable)
      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()
      Get Provider instance for this factory.
      Returns:
      Provider instance
    • getProviderName

      String getProviderName()
      Get String which represents providers name for this factory.
      Returns:
      String which represents providers name
    • createJceKeyTransEnvelopedRecipient

      IJceKeyTransEnvelopedRecipient createJceKeyTransEnvelopedRecipient (PrivateKey privateKey)
      Create Jce Key trans enveloped recipient wrapper from PrivateKey.
      Parameters:
      privateKey - PrivateKey to create Jce Key trans enveloped recipient wrapper from
      Returns:
      created Jce Key trans enveloped recipient wrapper
    • createJceKeyAgreeEnvelopedRecipient

      IJceKeyAgreeEnvelopedRecipient createJceKeyAgreeEnvelopedRecipient (PrivateKey privateKey)
      Create Jce Key agree enveloped recipient wrapper from PrivateKey.
      Parameters:
      privateKey - PrivateKey to create Jce Key agree enveloped recipient wrapper from
      Returns:
      created Jce Key agree 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 and BigInteger.
      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

      IX509CertificateHolder createX509CertificateHolder (byte[] bytes) throws IOException
      Create X509 Certificate holder wrapper from byte[].
      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 from X509Certificate.
      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

      IExtensions createExtensions (IExtension extension)
      Create extensions wrapper from extension wrapper.
      Parameters:
      extension - extension wrapper to create extensions wrapper from
      Returns:
      created extensions wrapper
    • createExtensions

      IExtensions createExtensions (IExtension[] extensions)
      Create extensions wrapper from extension wrapper.
      Parameters:
      extensions - array of the extension wrappers to create extensions wrapper from
      Returns:
      created extensions wrapper
    • createNullExtensions

      IExtensions createNullExtensions()
      Create extensions wrapper for null 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

      IASN1String createASN1String (IASN1Encodable encodable)
      Cast ASN1 Encodable wrapper to ASN1 String wrapper.
      Parameters:
      encodable - ASN1 Encodable wrapper to be cast
      Returns:
      casted ASN1 String wrapper
    • createASN1Primitive

      IASN1Primitive createASN1Primitive (IASN1Encodable encodable)
      Cast ASN1 Encodable wrapper to ASN1 Primitive wrapper.
      Parameters:
      encodable - ASN1 Encodable wrapper to be cast
      Returns:
      casted ASN1 Primitive wrapper
    • createASN1Primitive

      IASN1Primitive createASN1Primitive (byte[] array) throws IOException
      Create ASN1 Primitive wrapper from byte[] 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

      IOCSPResp createOCSPResp (IOCSPResponse ocspResponse)
      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

      IOCSPResp createOCSPResp (byte[] bytes) throws IOException
      Create OCSP Resp wrapper from byte[] 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

      IOCSPResponse createOCSPResponse (IOCSPResponseStatus respStatus, IResponseBytes responseBytes)
      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 using getInstance call.
      Returns:
      created OCSP Resp builder wrapper
    • createOCSPRespBuilder

      IOCSPRespBuilder createOCSPRespBuilder()
      Create OCSP Resp builder wrapper without parameters.
      Returns:
      created OCSP Resp builder wrapper
    • createOCSPResponseStatus

      IOCSPResponseStatus createOCSPResponseStatus (int status)
      Create OCSP Response status wrapper from int 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

      IRevokedStatus createRevokedStatus (ICertificateStatus certificateStatus)
      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

      IRevokedStatus createRevokedStatus (Date date, int i)
      Create revoked status wrapper from Date and int 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

      IDERIA5String createDERIA5String (IASN1TaggedObject taggedObject, boolean b)
      Create DERIA5 String wrapper from ASN1 Tagged object wrapper and boolean 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

      IDERIA5String createDERIA5String (String str)
      Create DERIA5 String wrapper from String value.
      Parameters:
      str - String value to create DERIA5 String wrapper from
      Returns:
      created DERIA5 String wrapper
    • createCRLDistPoint

      ICRLDistPoint createCRLDistPoint (Object object)
      Create CRL Dist point wrapper from Object.
      Parameters:
      object - Object to create CRL Dist point wrapper from
      Returns:
      created CRL Dist point wrapper
    • createIssuingDistributionPoint

      IIssuingDistributionPoint createIssuingDistributionPoint (Object point)
      Create Issuing Distribution Point wrapper from Object.
      Parameters:
      point - Object to create Issuing Distribution Point wrapper from
      Returns:
      created Issuing Distribution Point wrapper.
    • createIssuingDistributionPoint

      IIssuingDistributionPoint createIssuingDistributionPoint (IDistributionPointName distributionPoint, boolean onlyContainsUserCerts, boolean onlyContainsCACerts, IReasonFlags onlySomeReasons, boolean indirectCRL, boolean onlyContainsAttrCerts)
      Create Issuing Distribution Point wrapper with specified values.
      Parameters:
      distributionPoint - one of names from the corresponding distributionPoint from the cRLDistributionPoints extension of every certificate that is within the scope of this CRL
      onlyContainsUserCerts - true if the scope of the CRL only includes end entity public key certificates
      onlyContainsCACerts - true if the scope of the CRL only includes CA certificates
      onlySomeReasons - reason codes associated with a distribution point
      indirectCRL - true if CRL includes certificates issued by authorities other than the CRL issuer, false if the scope of the CRL only includes certificates issued by the CRL issuer
      onlyContainsAttrCerts - true if the scope of the CRL only includes attribute certificates
      Returns:
      created Issuing Distribution Point wrapper.
    • createReasonFlags

      IReasonFlags createReasonFlags (int reasons)
      Creates the wrapper for ReasonFlags.
      Parameters:
      reasons - the bitwise OR of the Key Reason flags giving the allowed uses for the key
      Returns:
      created ReasonFlags wrapper.
    • createDistributionPointName

      IDistributionPointName createDistributionPointName()
      Create distribution point name wrapper without parameters.
      Returns:
      created distribution point name wrapper.
    • createDistributionPointName

      IDistributionPointName createDistributionPointName (IGeneralNames generalNames)
      Create distribution point name wrapper by passing general names.
      Parameters:
      generalNames - general names to create distribution point name from
      Returns:
      created distribution point name wrapper.
    • createGeneralNames

      IGeneralNames createGeneralNames (IASN1Encodable encodable)
      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

      ISignaturePolicyIdentifier createSignaturePolicyIdentifier (ISignaturePolicyId policyId)
      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

      IRecipientInfo createRecipientInfo (IKeyTransRecipientInfo keyTransRecipientInfo)
      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

      ITBSCertificate createTBSCertificate (IASN1Encodable encodable)
      Create TBS Certificate wrapper from ASN1 Encodable wrapper.
      Parameters:
      encodable - ASN1 Encodable wrapper to create TBS Certificate wrapper from
      Returns:
      created TBS Certificate wrapper
    • createTBSCertificate

      ITBSCertificate createTBSCertificate (byte[] bytes)
      Create TBS Certificate wrapper from ASN1 Encoded data.
      Parameters:
      bytes - ASN1 Encoded TBS Certificate
      Returns:
      created TBS Certificate wrapper
    • createIssuerAndSerialNumber

      IIssuerAndSerialNumber createIssuerAndSerialNumber (IX500Name issuer, BigInteger value)
      Create issuer and serial number wrapper from X500 Name wrapper and BigInteger.
      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

      IRecipientIdentifier createRecipientIdentifier (IIssuerAndSerialNumber issuerAndSerialNumber)
      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 with null value.
      Returns:
      created originator info wrapper
    • createCMSEnvelopedData

      ICMSEnvelopedData createCMSEnvelopedData (byte[] valueBytes) throws AbstractCMSException
      Create CMS enveloped data from byte[] 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 from byte[] 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

      AbstractOCSPException createAbstractOCSPException (Exception e)
      Create OCSP Exception wrapper from usual Exception.
      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

      IASN1BitString createASN1BitString (IASN1Encodable encodable)
      Cast ASN1 Encodable wrapper to ASN1 Bit string wrapper.
      Parameters:
      encodable - ASN1 Encodable wrapper to be cast
      Returns:
      casted ASN1 Bit string wrapper
    • createASN1GeneralizedTime

      IASN1GeneralizedTime createASN1GeneralizedTime (IASN1Encodable encodable)
      Cast ASN1 Encodable wrapper to ASN1 Generalized time wrapper.
      Parameters:
      encodable - ASN1 Encodable wrapper to be cast
      Returns:
      casted ASN1 Generalized time wrapper
    • createASN1GeneralizedTime

      IASN1GeneralizedTime createASN1GeneralizedTime (Date date)
      Cast Date to ASN1 Generalized time wrapper.
      Parameters:
      date - Date to be cast
      Returns:
      ASN1 Generalized time wrapper
    • createASN1UTCTime

      IASN1UTCTime createASN1UTCTime (IASN1Encodable encodable)
      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 from List of Certificate objects.
      Parameters:
      certificates - List of Certificate 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 and Set 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

      ITimeStampRequest createTimeStampRequest (byte[] bytes) throws IOException
      Create timestamp request wrapper from byte[] 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

      IJcaContentSignerBuilder createJcaContentSignerBuilder (String algorithm)
      Create Jca content signer builder wrapper from String 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

      IX500Name createX500Name (X509Certificate certificate) throws CertificateEncodingException
      Create X500 Name wrapper from X509Certificate.
      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

      IX500Name createX500Name (String s)
      Create X500 Name wrapper from String.
      Parameters:
      s - String to create X500 Name wrapper from
      Returns:
      created X500 Name wrapper
    • createRespID

      IRespID createRespID (IX500Name x500Name)
      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

      IBasicOCSPRespBuilder createBasicOCSPRespBuilder (IRespID respID)
      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

      IOCSPReq createOCSPReq (byte[] requestBytes) throws IOException
      Create OCSP Req wrapper from byte[].
      Parameters:
      requestBytes - byte[] to create OCSP Req wrapper from
      Returns:
      created OCSP Req wrapper
      Throws:
      IOException - if input-output exception occurs during creation
    • createX509v2CRLBuilder

      IX509v2CRLBuilder createX509v2CRLBuilder (IX500Name x500Name, Date thisUpdate)
      Create X509 Version 2 CRL Builder wrapper from X500 Name wrapper and Date.
      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 from X509Certificate, BigInteger, start Date, end Date, X500 Name wrapper and PublicKey.
      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 - start Date to create Jca X509 Version 3 certificate builder wrapper from
      endDate - end Date 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

      IBasicConstraints createBasicConstraints (boolean b)
      Create basic constraints wrapper from boolean value.
      Parameters:
      b - boolean value to create basic constraints wrapper from
      Returns:
      created basic constraints wrapper
    • createBasicConstraints

      IBasicConstraints createBasicConstraints (int pathLength)
      Create basic constraints wrapper from int value.
      Parameters:
      pathLength - int flag 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

      IKeyUsage createKeyUsage (int i)
      Create key usage wrapper from int 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
    • createKeyPurposeId

      IKeyPurposeId createKeyPurposeId (IASN1ObjectIdentifier objectIdentifier)
      Create key purpose id wrapper from IASN1ObjectIdentifier.
      Parameters:
      objectIdentifier - IASN1ObjectIdentifier to create key purpose id wrapper from
      Returns:
      created key purpose id wrapper
    • createExtendedKeyUsage

      IExtendedKeyUsage createExtendedKeyUsage (IKeyPurposeId purposeId)
      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
    • createExtendedKeyUsage

      IExtendedKeyUsage createExtendedKeyUsage (IKeyPurposeId[] purposeIds)
      Create extended key usage wrapper from key purpose id wrappers array.
      Parameters:
      purposeIds - IKeyPurposeId array to create extended key usage wrapper from
      Returns:
      created extended key usage wrapper
    • createX509ExtensionUtils

      IX509ExtensionUtils createX509ExtensionUtils (IDigestCalculator digestCalculator)
      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

      ISubjectPublicKeyInfo createSubjectPublicKeyInfo (Object obj)
      Create subject public key info wrapper from Object.
      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

      ITSTInfo createTSTInfo (IContentInfo contentInfo) throws AbstractTSPException, IOException
      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

      ISingleResp createSingleResp (IBasicOCSPResponse basicResp)
      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

      X509Certificate createX509Certificate (Object element)
      Cast Object element to X509Certificate.
      Parameters:
      element - Object to be cast
      Returns:
      casted X509Certificate
    • getBouncyCastleFactoryTestUtil

      IBouncyCastleTestConstantsFactory getBouncyCastleFactoryTestUtil()
      Returns:
      IBouncyCastleTestConstantsFactory instance
    • createNullCrl

      CRL createNullCrl()
      Create null as CRL object.
      Returns:
      null as CRL object
    • createPEMParser

      IPEMParser createPEMParser (Reader reader)
      Create PEM Parser wrapper from Reader.
      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

      ITime createTime (Date date)
      Create time wrapper from Date.
      Parameters:
      date - Date to create time wrapper from
      Returns:
      created time wrapper
    • createEndDate

      ITime createEndDate (X509Certificate certificate)
      Create time wrapper from the end date of the certificate.
      Parameters:
      certificate - X509Certificate to get end date to create time wrapper from
      Returns:
      created time wrapper
    • isNullExtension

      boolean isNullExtension (IExtension extNonce)
      Checks if provided extension wrapper wraps null.
      Parameters:
      extNonce - extension wrapper to check
      Returns:
      true if provided extension wrapper wraps null, false otherwise
    • isNull

      boolean isNull (IASN1Encodable encodable)
      Check if provided encodable wrapper wrap null.
      Parameters:
      encodable - encodable wrapper to be checked
      Returns:
      true if provided encodable wrapper wraps null, false otherwise
    • getSecureRandom

      SecureRandom getSecureRandom()
      Get SecureRandom 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 from X509Certificate, 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