Package com.appslandia.common.crypto
Class DsaDigester
- 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
-
-
Field Summary
-
Fields inherited from class com.appslandia.common.base.InitializeObject
mutex
-
-
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(java.lang.String algorithm)DsaDigestersetPrivateKey(java.lang.String privateKeyPem)DsaDigestersetPrivateKey(java.security.PrivateKey privateKey)DsaDigestersetProvider(java.lang.String provider)DsaDigestersetPublicKey(java.lang.String publicKeyPem)DsaDigestersetPublicKey(java.security.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 java.lang.Exception- Specified by:
initin classInitializeObject- Throws:
java.lang.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(java.lang.String algorithm)
-
setProvider
public DsaDigester setProvider(java.lang.String provider)
-
setPrivateKey
public DsaDigester setPrivateKey(java.security.PrivateKey privateKey)
-
setPrivateKey
public DsaDigester setPrivateKey(java.lang.String privateKeyPem)
-
setPublicKey
public DsaDigester setPublicKey(java.security.PublicKey publicKey)
-
setPublicKey
public DsaDigester setPublicKey(java.lang.String publicKeyPem)
-
copy
public DsaDigester copy()
-
-