Class CryptoManagerImpl
java.lang.Object
com.biglybt.core.security.impl.CryptoManagerImpl
- All Implemented Interfaces:
CryptoManager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classstatic interfaceprivate static classNested classes/interfaces inherited from interface CryptoManager
CryptoManager.SRPParameters -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CryptoHandlerprivate final Map<Integer, CryptoHandler> private final CopyOnWriteListprivate final CopyOnWriteListprivate static final Stringprivate static final Stringprivate static final intprivate static final intprivate byte[]private final Mapprivate static CryptoManagerImplFields inherited from interface CryptoManager
CRYPTO_CONFIG_PREFIX, HANDLER_ECC, HANDLERS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddKeyListener(CryptoManagerKeyListener listener) voidprotected voidaddPasswordTimer(String timeout_key, String pw_key, long timeout) protected voidclearPassword(int handler, int password_handler_type) voidvoidclearPasswords(int password_handler_type) protected byte[]decryptWithPBE(byte[] data, char[] password) byte[]deobfuscate(byte[] data) protected byte[]encryptWithPBE(byte[] data, char[] password) getECCHandler(int instance) private byte[]getOBSID()protected CryptoManagerImpl.passwordDetailsgetPassword(int handler, int action, String reason, CryptoManagerImpl.passwordTester tester, int pw_type) protected byte[]byte[]static CryptoManagerprotected voidkeyChanged(CryptoHandler handler) protected voidlockChanged(CryptoHandler handler) static voidbyte[]obfuscate(byte[] data) voidremoveKeyListener(CryptoManagerKeyListener listener) voidprotected CryptoManagerImpl.passwordDetailssetPassword(int handler, int pw_type, char[] pw_chars, long timeout) protected voidsetSecureID(byte[] id) voidsetSRPParameters(byte[] salt, BigInteger verifier)
-
Field Details
-
PBE_ITERATIONS_V1
private static final int PBE_ITERATIONS_V1- See Also:
-
PBE_ITERATIONS_V2
private static final int PBE_ITERATIONS_V2- See Also:
-
PBE_ALG_V1
- See Also:
-
PBE_ALG_V2
- See Also:
-
singleton
-
secure_id
private byte[] secure_id -
password_handlers
-
keychange_listeners
-
session_passwords
-
ecc_handler
-
ecc_handlers
-
-
Constructor Details
-
CryptoManagerImpl
protected CryptoManagerImpl()
-
-
Method Details
-
getSingleton
-
addPasswordTimer
-
getSecureID
public byte[] getSecureID()- Specified by:
getSecureIDin interfaceCryptoManager
-
getOBSID
private byte[] getOBSID() -
obfuscate
public byte[] obfuscate(byte[] data) - Specified by:
obfuscatein interfaceCryptoManager
-
deobfuscate
public byte[] deobfuscate(byte[] data) - Specified by:
deobfuscatein interfaceCryptoManager
-
getECCHandler
- Specified by:
getECCHandlerin interfaceCryptoManager
-
getECCHandler
- Specified by:
getECCHandlerin interfaceCryptoManager- Parameters:
instance- 1 = global handler, 2 = anonynmous friends- Returns:
-
encryptWithPBE
- Throws:
CryptoManagerException
-
decryptWithPBE
- Throws:
CryptoManagerException
-
clearPasswords
public void clearPasswords()- Specified by:
clearPasswordsin interfaceCryptoManager
-
clearPasswords
public void clearPasswords(int password_handler_type) - Specified by:
clearPasswordsin interfaceCryptoManager
-
clearPassword
protected void clearPassword(int handler, int password_handler_type) -
setPassword
protected CryptoManagerImpl.passwordDetails setPassword(int handler, int pw_type, char[] pw_chars, long timeout) throws CryptoManagerException - Throws:
CryptoManagerException
-
getPassword
protected CryptoManagerImpl.passwordDetails getPassword(int handler, int action, String reason, CryptoManagerImpl.passwordTester tester, int pw_type) throws CryptoManagerException - Throws:
CryptoManagerException
-
getPasswordSalt
protected byte[] getPasswordSalt() -
setSecureID
protected void setSecureID(byte[] id) -
keyChanged
-
lockChanged
-
addPasswordHandler
- Specified by:
addPasswordHandlerin interfaceCryptoManager
-
removePasswordHandler
- Specified by:
removePasswordHandlerin interfaceCryptoManager
-
addKeyListener
- Specified by:
addKeyListenerin interfaceCryptoManager
-
removeKeyListener
- Specified by:
removeKeyListenerin interfaceCryptoManager
-
setSRPParameters
- Specified by:
setSRPParametersin interfaceCryptoManager
-
getSRPParameters
- Specified by:
getSRPParametersin interfaceCryptoManager
-
main
-