public byte [ ] sign ( byte [ ] input ) throws GeneralSecurityException , IOException { Signature sgr = new EdDSAEngine ( MessageDigest . getInstance ( NKey . ed25519 . getHashAlgorithm ( ) ) ) ; PrivateKey sKey = getKeyPair ( ) . getPrivate ( ) ; sgr . initSign ( sKey ) ; sgr . update ( input ) ; return sgr . sign ( ) ; }
Sign aribitrary binary input .