Package com.biglybt.core.security.impl
Class CryptoManagerImpl
java.lang.Object
com.biglybt.core.security.impl.CryptoManagerImpl
- All Implemented Interfaces:
CryptoManager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
static interface
private static class
Nested classes/interfaces inherited from interface com.biglybt.core.security.CryptoManager
CryptoManager.SRPParameters
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CryptoHandler
private final Map
<Integer, CryptoHandler> private final CopyOnWriteList
private final CopyOnWriteList
private static final String
private static final String
private static final int
private static final int
private byte[]
private final Map
private static CryptoManagerImpl
Fields inherited from interface com.biglybt.core.security.CryptoManager
CRYPTO_CONFIG_PREFIX, HANDLER_ECC, HANDLERS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addKeyListener
(CryptoManagerKeyListener listener) void
protected void
addPasswordTimer
(String timeout_key, String pw_key, long timeout) protected void
clearPassword
(int handler, int password_handler_type) void
void
clearPasswords
(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.passwordDetails
getPassword
(int handler, int action, String reason, CryptoManagerImpl.passwordTester tester, int pw_type) protected byte[]
byte[]
static CryptoManager
protected void
keyChanged
(CryptoHandler handler) protected void
lockChanged
(CryptoHandler handler) static void
byte[]
obfuscate
(byte[] data) void
removeKeyListener
(CryptoManagerKeyListener listener) void
protected CryptoManagerImpl.passwordDetails
setPassword
(int handler, int pw_type, char[] pw_chars, long timeout) protected void
setSecureID
(byte[] id) void
setSRPParameters
(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:
getSecureID
in interfaceCryptoManager
-
getOBSID
private byte[] getOBSID() -
obfuscate
public byte[] obfuscate(byte[] data) - Specified by:
obfuscate
in interfaceCryptoManager
-
deobfuscate
public byte[] deobfuscate(byte[] data) - Specified by:
deobfuscate
in interfaceCryptoManager
-
getECCHandler
- Specified by:
getECCHandler
in interfaceCryptoManager
-
getECCHandler
- Specified by:
getECCHandler
in interfaceCryptoManager
- Parameters:
instance
- 1 = global handler, 2 = anonynmous friends- Returns:
-
encryptWithPBE
- Throws:
CryptoManagerException
-
decryptWithPBE
- Throws:
CryptoManagerException
-
clearPasswords
public void clearPasswords()- Specified by:
clearPasswords
in interfaceCryptoManager
-
clearPasswords
public void clearPasswords(int password_handler_type) - Specified by:
clearPasswords
in 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:
addPasswordHandler
in interfaceCryptoManager
-
removePasswordHandler
- Specified by:
removePasswordHandler
in interfaceCryptoManager
-
addKeyListener
- Specified by:
addKeyListener
in interfaceCryptoManager
-
removeKeyListener
- Specified by:
removeKeyListener
in interfaceCryptoManager
-
setSRPParameters
- Specified by:
setSRPParameters
in interfaceCryptoManager
-
getSRPParameters
- Specified by:
getSRPParameters
in interfaceCryptoManager
-
main
-