Class RsaSsaPkcs1VerifyConscrypt

  • All Implemented Interfaces:
    PublicKeyVerify

    @Immutable
    public final class RsaSsaPkcs1VerifyConscrypt
    extends java.lang.Object
    implements PublicKeyVerify
    RsaSsaPkcs1 (i.e. RSA Signature Schemes with Appendix (SSA) using PKCS1-v1_5 encoding) verifying with JCE.
    • Method Detail

      • toRsaSsaPkcs1Algo

        public static java.lang.String toRsaSsaPkcs1Algo​(RsaSsaPkcs1Parameters.HashType hashType)
                                                  throws java.security.GeneralSecurityException
        Throws:
        java.security.GeneralSecurityException
      • create

        public static PublicKeyVerify create​(RsaSsaPkcs1PublicKey key)
                                      throws java.security.GeneralSecurityException
        Returns a new instance of PublicKeyVerify for RsaSsaPkcs1 that uses Conscrypt.

        If Conscrypt is not available, this will throw a GeneralSecurityException.

        If FIPS mode is enabled but BoringCrypto is not available, this will throw a GeneralSecurityException.

        Throws:
        java.security.GeneralSecurityException
      • createWithProvider

        public static PublicKeyVerify createWithProvider​(RsaSsaPkcs1PublicKey key,
                                                         java.security.Provider conscrypt)
                                                  throws java.security.GeneralSecurityException
        Throws:
        java.security.GeneralSecurityException
      • verify

        public void verify​(byte[] signature,
                           byte[] data)
                    throws java.security.GeneralSecurityException
        Description copied from interface: PublicKeyVerify
        Verifies whether signature is a valid signature for data.
        Specified by:
        verify in interface PublicKeyVerify
        Throws:
        java.security.GeneralSecurityException - if signature is not a valid signature for data