Class Ed25519Verify

  • All Implemented Interfaces:
    PublicKeyVerify

    @Immutable
    public final class Ed25519Verify
    extends java.lang.Object
    implements PublicKeyVerify
    Ed25519 verifying.

    The first call to this function may take longer, because Ed25519Constants needs to be initialized.

    Usage

    
     // get the publicKey from the other party.
     Ed25519Verify verifier = new Ed25519Verify(publicKey);
     try {
       verifier.verify(signature, message);
     } catch (GeneralSecurityException e) {
       // all the rest of security exceptions.
     }
     
    Since:
    1.1.0
    • Constructor Detail

      • Ed25519Verify

        public Ed25519Verify​(byte[] publicKey)
    • Method Detail

      • create

        public static PublicKeyVerify create​(Ed25519PublicKey key)
                                      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