Interface CryptoHandler
- All Known Implementing Classes:
CryptoHandlerECC
public interface CryptoHandler
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]byte[]intbyte[]getEncryptedPrivateKey(String reason) intbyte[]getPublicKey(String reason) getSTSEngine(String reason) getSTSEngine(PublicKey public_key, PrivateKey private_key) intgetType()intbooleanimportKeys(String str) booleanvoidlock()Puts the handler back into a state where password will be required to access private stuffbyte[]voidrecoverKeys(byte[] public_key, byte[] encrypted_private_key) voidvoidsetDefaultPasswordHandlerType(int new_type) voidsetUnlockTimeoutSeconds(int secs) byte[]voidunlock()Explicit unlock requestbooleanverify(byte[] public_key, byte[] data, byte[] signature) booleanverifyPublicKey(byte[] encoded)
-
Method Details
-
getType
int getType() -
getInstance
int getInstance() -
unlock
-
lock
void lock()Puts the handler back into a state where password will be required to access private stuff -
isUnlocked
boolean isUnlocked() -
getUnlockTimeoutSeconds
int getUnlockTimeoutSeconds() -
setUnlockTimeoutSeconds
void setUnlockTimeoutSeconds(int secs) - Parameters:
secs- 0-> infinite
-
sign
- Throws:
CryptoManagerException
-
verify
- Throws:
CryptoManagerException
-
encrypt
- Throws:
CryptoManagerException
-
decrypt
- Throws:
CryptoManagerException
-
getSTSEngine
- Throws:
CryptoManagerException
-
getSTSEngine
CryptoSTSEngine getSTSEngine(PublicKey public_key, PrivateKey private_key) throws CryptoManagerException - Throws:
CryptoManagerException
-
peekPublicKey
byte[] peekPublicKey() -
getPublicKey
- Throws:
CryptoManagerException
-
getEncryptedPrivateKey
- Throws:
CryptoManagerException
-
verifyPublicKey
boolean verifyPublicKey(byte[] encoded) -
recoverKeys
- Throws:
CryptoManagerException
-
resetKeys
- Throws:
CryptoManagerException
-
exportKeys
- Throws:
CryptoManagerException
-
getDefaultPasswordHandlerType
int getDefaultPasswordHandlerType() -
setDefaultPasswordHandlerType
- Throws:
CryptoManagerException
-
importKeys
- Parameters:
str-- Returns:
- true if a client restart is required
- Throws:
CryptoManagerException
-