- java.lang.Object
-
- com.appslandia.common.base.InitializeObject
-
- com.appslandia.common.crypto.DsaDigester
-
- All Implemented Interfaces:
InitializeSupport,Digester
public class DsaDigester extends InitializeObject implements Digester
- Author:
- Loc Ha
-
-
Constructor Summary
Constructors Constructor Description DsaDigester()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DsaDigestercopy()voiddestroy()byte[]digest(byte[] message)byte[]digest(byte[] message, Out<byte[]> salt)protected voidinit()DsaDigestersetAlgorithm(String algorithm)DsaDigestersetPrivateKey(String privateKeyPem)DsaDigestersetPrivateKey(PrivateKey privateKey)DsaDigestersetProvider(String provider)DsaDigestersetPublicKey(String publicKeyPem)DsaDigestersetPublicKey(PublicKey publicKey)booleanverify(byte[] message, byte[] signature)booleanverify(byte[] message, byte[] digested, byte[] salt)-
Methods inherited from class com.appslandia.common.base.InitializeObject
assertNotInitialized, initialize
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.appslandia.common.base.InitializeSupport
initialize
-
-
-
-
Method Detail
-
init
protected void init() throws Exception- Specified by:
initin classInitializeObject- Throws:
Exception
-
destroy
public void destroy() throws DestroyException- Specified by:
destroyin interfaceInitializeSupport- Overrides:
destroyin classInitializeObject- Throws:
DestroyException
-
digest
public byte[] digest(byte[] message) throws CryptoException- Specified by:
digestin interfaceDigester- Throws:
CryptoException
-
verify
public boolean verify(byte[] message, byte[] signature) throws CryptoException- Specified by:
verifyin interfaceDigester- Throws:
CryptoException
-
digest
public byte[] digest(byte[] message, Out<byte[]> salt) throws CryptoException- Specified by:
digestin interfaceDigester- Throws:
CryptoException
-
verify
public boolean verify(byte[] message, byte[] digested, byte[] salt) throws CryptoException- Specified by:
verifyin interfaceDigester- Throws:
CryptoException
-
setAlgorithm
public DsaDigester setAlgorithm(String algorithm)
-
setProvider
public DsaDigester setProvider(String provider)
-
setPrivateKey
public DsaDigester setPrivateKey(PrivateKey privateKey)
-
setPrivateKey
public DsaDigester setPrivateKey(String privateKeyPem)
-
setPublicKey
public DsaDigester setPublicKey(PublicKey publicKey)
-
setPublicKey
public DsaDigester setPublicKey(String publicKeyPem)
-
copy
public DsaDigester copy()
-
-