eric6.Utilities.crypto.__init__
Package implementing cryptography related functionality.
Global Attributes
CryptoMarker |
Delimiter |
EncodeMarker |
MasterPassword |
Classes
Functions
__getMasterPassword |
Private module function to get the password from the user. |
changeRememberedMaster |
Module function to change the remembered master password. |
dataDecrypt |
Module function to decrypt a password. |
dataEncrypt |
Module function to encrypt a password. |
pwConvert |
Module function to convert a plaintext password to the encoded form or vice versa. |
pwDecode |
Module function to decode a password. |
pwDecrypt |
Module function to decrypt a password. |
pwEncode |
Module function to encode a password. |
pwEncrypt |
Module function to encrypt a password. |
pwRecode |
Module function to re-encode a password. |
pwReencrypt |
Module function to re-encrypt a password. |
__getMasterPassword
__getMasterPassword()
Private module function to get the password from the user.
changeRememberedMaster
changeRememberedMaster(newPassword)
Module function to change the remembered master password.
- newPassword
-
new password to be used (string)
dataDecrypt
dataDecrypt(edata, password, keyLength=32)
Module function to decrypt a password.
- edata
-
hashed data to decrypt (string)
- password
-
password to be used for decryption (string)
- keyLength=
-
length of the key to be generated for decryption
(16, 24 or 32)
- Returns:
-
decrypted data (bytes) and flag indicating
success (boolean)
dataEncrypt
dataEncrypt(data, password, keyLength=32, hashIterations=10000)
Module function to encrypt a password.
- data
-
data to encrypt (bytes)
- password
-
password to be used for encryption (string)
- keyLength=
-
length of the key to be generated for encryption
(16, 24 or 32)
- hashIterations=
-
number of hashes to be applied to the password for
generating the encryption key (integer)
- Returns:
-
encrypted data (bytes) and flag indicating
success (boolean)
pwConvert
pwConvert(pw, encode=True)
Module function to convert a plaintext password to the encoded form or
vice versa.
If there is an error, an empty code is returned for the encode function
or the given encoded password for the decode function.
- pw
-
password to encode (string)
- encode
-
flag indicating an encode or decode function (boolean)
- Returns:
-
encoded or decoded password (string)
pwDecode
pwDecode(epw)
Module function to decode a password.
- epw
-
encoded password to decode (string)
- Returns:
-
decoded password (string)
pwDecrypt
pwDecrypt(epw, masterPW=None)
Module function to decrypt a password.
- epw
-
hashed password to decrypt (string)
- masterPW
-
password to be used for decryption (string)
- Returns:
-
decrypted password (string) and flag indicating
success (boolean)
pwEncode
pwEncode(pw)
Module function to encode a password.
- pw
-
password to encode (string)
- Returns:
-
encoded password (string)
pwEncrypt
pwEncrypt(pw, masterPW=None)
Module function to encrypt a password.
- pw
-
password to encrypt (string)
- masterPW
-
password to be used for encryption (string)
- Returns:
-
encrypted password (string) and flag indicating
success (boolean)
pwRecode
pwRecode(epw, oldPassword, newPassword)
Module function to re-encode a password.
In case of an error the encoded password is returned unchanged.
- epw
-
encoded password to re-encode (string)
- oldPassword
-
password used to encode (string)
- newPassword
-
new password to be used (string)
- Returns:
-
encoded password (string)
pwReencrypt
pwReencrypt(epw, oldPassword, newPassword)
Module function to re-encrypt a password.
- epw
-
hashed password to re-encrypt (string)
- oldPassword
-
password used to encrypt (string)
- newPassword
-
new password to be used (string)
- Returns:
-
encrypted password (string) and flag indicating
success (boolean)