net.i2p.crypto.eddsa
Class EdDSAEngine

java.lang.Object
  extended by java.security.SignatureSpi
      extended by java.security.Signature
          extended by net.i2p.crypto.eddsa.EdDSAEngine

public class EdDSAEngine
extends Signature

Since:
0.9.15
Author:
str4d

Field Summary
 
Fields inherited from class java.security.Signature
SIGN, state, UNINITIALIZED, VERIFY
 
Fields inherited from class java.security.SignatureSpi
appRandom
 
Constructor Summary
EdDSAEngine()
          No specific hash requested, allows any EdDSA key.
EdDSAEngine(MessageDigest digest)
          Specific hash requested, only matching keys will be allowed.
 
Method Summary
protected  Object engineGetParameter(String param)
          Deprecated.  
protected  void engineInitSign(PrivateKey privateKey)
           
protected  void engineInitVerify(PublicKey publicKey)
           
protected  void engineSetParameter(String param, Object value)
          Deprecated. replaced with
protected  byte[] engineSign()
           
protected  void engineUpdate(byte b)
           
protected  void engineUpdate(byte[] b, int off, int len)
           
protected  boolean engineVerify(byte[] sigBytes)
           
 
Methods inherited from class java.security.Signature
clone, getAlgorithm, getInstance, getInstance, getInstance, getParameter, getParameters, getProvider, initSign, initSign, initVerify, initVerify, setParameter, setParameter, sign, sign, toString, update, update, update, update, verify, verify
 
Methods inherited from class java.security.SignatureSpi
engineGetParameters, engineInitSign, engineSetParameter, engineSign, engineUpdate, engineVerify
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EdDSAEngine

public EdDSAEngine()
No specific hash requested, allows any EdDSA key.


EdDSAEngine

public EdDSAEngine(MessageDigest digest)
Specific hash requested, only matching keys will be allowed.

Parameters:
digest - the hash algorithm that keys must have to sign or verify.
Method Detail

engineInitSign

protected void engineInitSign(PrivateKey privateKey)
                       throws InvalidKeyException
Specified by:
engineInitSign in class SignatureSpi
Throws:
InvalidKeyException

engineInitVerify

protected void engineInitVerify(PublicKey publicKey)
                         throws InvalidKeyException
Specified by:
engineInitVerify in class SignatureSpi
Throws:
InvalidKeyException

engineUpdate

protected void engineUpdate(byte b)
                     throws SignatureException
Specified by:
engineUpdate in class SignatureSpi
Throws:
SignatureException

engineUpdate

protected void engineUpdate(byte[] b,
                            int off,
                            int len)
                     throws SignatureException
Specified by:
engineUpdate in class SignatureSpi
Throws:
SignatureException

engineSign

protected byte[] engineSign()
                     throws SignatureException
Specified by:
engineSign in class SignatureSpi
Throws:
SignatureException

engineVerify

protected boolean engineVerify(byte[] sigBytes)
                        throws SignatureException
Specified by:
engineVerify in class SignatureSpi
Throws:
SignatureException

engineSetParameter

protected void engineSetParameter(String param,
                                  Object value)
Deprecated. replaced with

Specified by:
engineSetParameter in class SignatureSpi

engineGetParameter

protected Object engineGetParameter(String param)
Deprecated. 

Specified by:
engineGetParameter in class SignatureSpi