LitDev Extension API
LDEncryption
![](images/IntellisenseObject.png)
Encryption and hash methods.
AESDecrypt
![]() |
AESEncrypt
![]() |
MD5Hash
![]() |
MD5HashFile
![]() |
RSADecrypt
![]() |
RSAEncrypt
![]() |
RSAPrivateKey
![]() |
RSAPublicKey
![]() |
RSAReset
![]() |
RSASign
![]() |
RSAVerify
![]() |
SHA512Hash
![]() |
SHA512HashFile
![]() |
AESDecrypt(cypher,password)
![](images/IntellisenseMethod.png)
Decrypt an AES encrypted cypher (previously encrypted) using a password key.
cypher The encrypted text (cypher).
password The password key for the encryption.
returns The original unencrypted text or "" if password and cypher don't match.
AESEncrypt(source,password)
![](images/IntellisenseMethod.png)
Encrypt some text using AES encryption and a password key.
The encrypted text can be saved to a file.
Note that if you forget the password there is NO WAY to decrypt!
source The text to encrypt.
password The password key for the encryption.
returns The encrypted text (cypher).
MD5Hash(text)
![](images/IntellisenseMethod.png)
Create an MD5 hash of a text input (http://wikipedia.org/wiki/MD5).
This 32 character hash is recommended where a general or shorter hash is required (password or data integrity).
text A text or password to create a hash.
returns The 32 character hex MD5 Hash.
MD5HashFile(fileName)
![](images/IntellisenseMethod.png)
Create an MD5 hash of a file.
This 32 character hash is for file data integrity checks (e.g. a file contents is unchanged).
fileName The full path to a file to get the hash.
returns The 32 character hex MD5 Hash.
RSADecrypt(encrypted)
![](images/IntellisenseMethod.png)
Decrpyt an RSA message.
Requires a Private key to be set (Only originator can decrypt with private key).
If no key is set then one created for this session is used.
encrypted The encypted message.
returns The unencrypted message.
RSAEncrypt(unencrypted)
![](images/IntellisenseMethod.png)
Encrypt an RSA message.
Requires a Public key to be set (Anyone can encrypt with public key).
If no key is set then one created for this session is used.
unencrypted The message to encrypt.
returns The encrypted message.
RSAPrivateKey
![](images/IntellisenseProperty.png)
Get or set a private RSA key.
RSAPublicKey
![](images/IntellisenseProperty.png)
Get or set a public RSA key.
RSAReset()
![](images/IntellisenseMethod.png)
Randomly reset the private and public keys
RSASign(data)
![](images/IntellisenseMethod.png)
Sign an RSA message.
Requires a Private key to be set (Only originator can sign with private key).
If no key is set then one created for this session is used.
data The message to sign.
returns The signing for the message.
RSAVerify(data,sign)
![](images/IntellisenseMethod.png)
Verify a signed RSA message.
Requires a Public key to be set (Anyone can verify with public key).
If no key is set then one created for this session is used.
data The message that was signed.
sign The signing for the message.
returns "True" or "False".
SHA512Hash(password)
![](images/IntellisenseMethod.png)
Create a SHA2-512 hash of a text input.
This 128 character hash is recommended for the most secure password encryption.
password A text to create a hash (often a password).
returns The 128 character hex SHA512 Hash.
SHA512HashFile(fileName)
![](images/IntellisenseMethod.png)
Create an SHA512 hash of a file.
This 128 character hash is for file data integrity checks (e.g. a file contents is unchanged).
fileName The full path to a file to get the hash.
returns The 128 character hex SHA512 Hash.