Class Ed25519VerifyJce

  • All Implemented Interfaces:
    PublicKeyVerify

    @Immutable
    public final class Ed25519VerifyJce
    extends java.lang.Object
    implements PublicKeyVerify
    Ed25519 verifying using the JCE.

    Can currently only be used when the Conscrypt provider is available.

    • Method Detail

      • create

        public static PublicKeyVerify create​(Ed25519PublicKey key)
                                      throws java.security.GeneralSecurityException
        Throws:
        java.security.GeneralSecurityException
      • createWithProvider

        public static PublicKeyVerify createWithProvider​(Ed25519PublicKey key,
                                                         java.security.Provider provider)
                                                  throws java.security.GeneralSecurityException
        Throws:
        java.security.GeneralSecurityException
      • isSupported

        public static boolean isSupported()
        Returns true if the JCE supports Ed25519.
      • 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