Class EncryptionUtils


  • final class EncryptionUtils
    extends java.lang.Object
    • Field Detail

      • ENVELOPE_ENCRYPTION_ALGORITHM_OID

        private static final java.lang.String ENVELOPE_ENCRYPTION_ALGORITHM_OID
        See Also:
        Constant Field Values
      • ENVELOPE_ENCRYPTION_ALGORITHM_JCA_NAME

        private static final java.lang.String ENVELOPE_ENCRYPTION_ALGORITHM_JCA_NAME
        See Also:
        Constant Field Values
      • ENVELOPE_ENCRYPTION_KEY_LENGTH

        private static final int ENVELOPE_ENCRYPTION_KEY_LENGTH
        See Also:
        Constant Field Values
      • UNSUPPORTED_ALGORITHMS

        private static final java.util.Set<java.lang.String> UNSUPPORTED_ALGORITHMS
    • Constructor Detail

      • EncryptionUtils

        EncryptionUtils()
    • Method Detail

      • generateSeed

        static byte[] generateSeed​(int seedLength)
      • fetchEnvelopedData

        static byte[] fetchEnvelopedData​(java.security.Key certificateKey,
                                         java.security.cert.Certificate certificate,
                                         java.lang.String certificateKeyProvider,
                                         IExternalDecryptionProcess externalDecryptionProcess,
                                         PdfArray recipients)
      • cipherBytes

        static byte[] cipherBytes​(java.security.cert.X509Certificate x509certificate,
                                  byte[] abyte0,
                                  IAlgorithmIdentifier algorithmIdentifier)
                           throws java.security.GeneralSecurityException
        Throws:
        java.security.GeneralSecurityException
      • calculateDERForRecipientParams

        static EncryptionUtils.DERForRecipientParams calculateDERForRecipientParams​(byte[] in)
                                                                             throws java.io.IOException,
                                                                                    java.security.GeneralSecurityException
        Throws:
        java.io.IOException
        java.security.GeneralSecurityException