Press on the image to return to the main documentation page.
iEncryption
List of types:
Cipher
MessageDigest
SecureRandom
Cipher
Events:
None
Members:
Decrypt
(
Data
()
As
Byte
,
Password
As
String
)
As
Byte
()
Decrypt2
(
Data
()
As
Byte
,
Key
()
As
Byte
,
Algorithm
As
String
,
IV
()
As
Byte
,
Options
As
Int
)
As
Byte
()
Encrypt
(
Data
()
As
Byte
,
Password
As
String
)
As
Byte
()
Encrypt2
(
Data
()
As
Byte
,
Key
()
As
Byte
,
Algorithm
As
String
,
IV
()
As
Byte
,
Options
As
Int
)
As
Byte
()
GenerateKey
(
Password
()
As
Byte
,
Algorithm
As
String
,
Salt
()
As
Byte
,
Rounds
As
Int
)
As
Byte
()
OPTION_ECBMode
As
Int
[read
only]
OPTION_PKCS7Padding
As
Int
[read
only]
Members description:
Decrypt
(
Data
()
As
Byte
,
Password
As
String
)
As
Byte
()
Decrypts the data that was previously created with the Encrypt method.
Encrypt and Decrypt methods are compatible with B4J/B4A B4XCipher methods.
Decrypt2
(
Data
()
As
Byte
,
Key
()
As
Byte
,
Algorithm
As
String
,
IV
()
As
Byte
,
Options
As
Int
)
As
Byte
()
Decrypts the given data and returns an array of bytes with the decrypted data.
Data - Data to decrypt.
Key - Cipher key.
Algorithm - One of the following values: AES, DES, 3DES or BLOWFISH.
IV - Initialization vector for block algorithms. Pass Null if not required.
Options - Zero or more OPTION constants combined with Bit.Or.
Encrypt
(
Data
()
As
Byte
,
Password
As
String
)
As
Byte
()
Encrypts the given data with AES algorithm.
A random salt and initialization vector are created and stored together with the encrypted data (public data).
Encrypt and Decrypt methods are compatible with B4J/B4A B4XCipher methods.
Encrypt2
(
Data
()
As
Byte
,
Key
()
As
Byte
,
Algorithm
As
String
,
IV
()
As
Byte
,
Options
As
Int
)
As
Byte
()
Encrypts the given data and returns an array of bytes with the encrypted data.
Data - Data to encrypt.
Key - Cipher key.
Algorithm - One of the following values: AES, DES, 3DES or BLOWFISH.
IV - Initialization vector for block algorithms. Pass Null if not required.
Options - Zero or more OPTION constants combined with Bit.Or.
GenerateKey
(
Password
()
As
Byte
,
Algorithm
As
String
,
Salt
()
As
Byte
,
Rounds
As
Int
)
As
Byte
()
Generates a key from the password.
Password - The key is derived from this password.
Algorithm - One of the following values: SHA-1, SHA-22, SHA-256, SHA-384 or SHA-512.
Salt - The key salt.
Rounds - Number of rounds that the algorithm will be applied.
OPTION_ECBMode
As
Int
[read
only]
Electronic cook book mode. Default mode is CBC.
OPTION_PKCS7Padding
As
Int
[read
only]
MessageDigest
Events:
None
Members:
GetMessageDigest
(
Data
()
As
Byte
,
Algorithm
As
String
)
As
Byte
()
Members description:
GetMessageDigest
(
Data
()
As
Byte
,
Algorithm
As
String
)
As
Byte
()
Calculates the message digest (hash or checksum) of the given data.
Algorithm - One of the following values: MD5, SHA-1, SHA-224, SHA-256, SHA-384 or SHA-512.
SecureRandom
Events:
None
Members:
GetRandomBytes
(
Buffer
()
As
Byte
)
Members description:
GetRandomBytes
(
Buffer
()
As
Byte
)
Fills the array with cryptographically secure random bytes.
Top