Class Ed25519SignJce

  • All Implemented Interfaces:
    PublicKeySign

    @Immutable
    public final class Ed25519SignJce
    extends java.lang.Object
    implements PublicKeySign
    Ed25519 signing using the JCE.

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

    • Constructor Detail

      • Ed25519SignJce

        public Ed25519SignJce​(byte[] privateKey)
                       throws java.security.GeneralSecurityException
        Constructs a Ed25519SignJce with the privateKey.
        Throws:
        java.security.GeneralSecurityException
    • Method Detail

      • create

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

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

        public static boolean isSupported()
        Returns true if the Conscrypt is available and supports Ed25519.
      • sign

        public byte[] sign​(byte[] data)
                    throws java.security.GeneralSecurityException
        Description copied from interface: PublicKeySign
        Computes the signature for data.
        Specified by:
        sign in interface PublicKeySign
        Returns:
        the signature of data
        Throws:
        java.security.GeneralSecurityException