com.aelitis.azureus.core.security
Interface CryptoHandler
- All Known Implementing Classes: 
 - CryptoHandlerECC
 
public interface CryptoHandler
 
getType
int getType()
 
unlock
void unlock()
            throws CryptoManagerException
- Explicit unlock request
- Throws:
 CryptoManagerException
 
 
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
byte[] sign(byte[] data,
            String reason)
            throws CryptoManagerException
- Throws:
 CryptoManagerException
 
verify
boolean verify(byte[] public_key,
               byte[] data,
               byte[] signature)
               throws CryptoManagerException
- Throws:
 CryptoManagerException
 
encrypt
byte[] encrypt(byte[] other_public_key,
               byte[] data,
               String reason)
               throws CryptoManagerException
- Throws:
 CryptoManagerException
 
decrypt
byte[] decrypt(byte[] other_public_key,
               byte[] data,
               String reason)
               throws CryptoManagerException
- Throws:
 CryptoManagerException
 
getSTSEngine
CryptoSTSEngine getSTSEngine(String reason)
                             throws CryptoManagerException
- Throws:
 CryptoManagerException
 
getSTSEngine
CryptoSTSEngine getSTSEngine(PublicKey public_key,
                             PrivateKey private_key)
                             throws CryptoManagerException
- Throws:
 CryptoManagerException
 
peekPublicKey
byte[] peekPublicKey()
 
getPublicKey
byte[] getPublicKey(String reason)
                    throws CryptoManagerException
- Throws:
 CryptoManagerException
 
getEncryptedPrivateKey
byte[] getEncryptedPrivateKey(String reason)
                              throws CryptoManagerException
- Throws:
 CryptoManagerException
 
verifyPublicKey
boolean verifyPublicKey(byte[] encoded)
 
recoverKeys
void recoverKeys(byte[] public_key,
                 byte[] encrypted_private_key)
                 throws CryptoManagerException
- Throws:
 CryptoManagerException
 
resetKeys
void resetKeys(String reason)
               throws CryptoManagerException
- Throws:
 CryptoManagerException
 
exportKeys
String exportKeys()
                  throws CryptoManagerException
- Throws:
 CryptoManagerException
 
getDefaultPasswordHandlerType
int getDefaultPasswordHandlerType()
 
setDefaultPasswordHandlerType
void setDefaultPasswordHandlerType(int new_type)
                                   throws CryptoManagerException
- Throws:
 CryptoManagerException
 
importKeys
boolean importKeys(String str)
                   throws CryptoManagerException
- Parameters:
 str - 
- Returns:
 - true if an Azureus restart is required
 - Throws:
 CryptoManagerException