Crypt

Various hash and encode/decode functions.

Algorithm

encryption algorithm enumeration

encryption algorithm enumeration

MEMBERS

dmCrypt::ALGORITHM_XTEA -


Result

result enumeration

result enumeration

MEMBERS

dmCrypt::RESULT_OK - = 0

dmCrypt::RESULT_ERROR - = 1


dmCrypt::Encrypt(algo, data, datalen, key, keylen)

Encrypt data in place

Encrypt data in place

PARAMETERS

algo - algorithm

data - data

datalen - data length in bytes

key - key

keylen - key length

RETURN

result - the encryption result


dmCrypt::Decrypt(algo, data, datalen, key, keylen)

Decrypt data in place

Decrypt data in place

PARAMETERS

algo - algorithm

data - data

datalen - data length in bytes

key - key

keylen - key length

RETURN

result - the decryption result


dmCrypt::HashSha1(buf, buflen, digest)

Hash buffer using SHA1

Hash buffer using SHA1

PARAMETERS

buf - The source data to hash

buflen - The length of source data in bytes

digest - The destination buffer (20 bytes)


dmCrypt::HashSha256(buf, buflen, digest)

Hash buffer using SHA256

Hash buffer using SHA256

PARAMETERS

buf - The source data to hash

buflen - key The length of source data in bytes

digest - The destination buffer (32 bytes)


dmCrypt::HashSha512(buf, buflen, digest)

Hash buffer using SHA512

Hash buffer using SHA512

PARAMETERS

buf - The source data to hash

buflen - key The length of source data in bytes

digest - The destination buffer (64 bytes)


dmCrypt::HashMd5(buf, buflen, digest)

Hash buffer using MD5

Hash buffer using MD5

PARAMETERS

buf - The source data to hash

buflen - key The length of source data in bytes

digest - The destination buffer (16 bytes)


dmCrypt::Base64Encode(src, src_len, dst, dst_len[in,out])

Base64 encode a buffer

Base64 encode a buffer

PARAMETERS

src - The source data to encode

src_len - key The length of source data in bytes

dst - The destination buffer

dst_len[in,out] - In: The length of the destination in bytes. Out: The length of the encoded string.

RETURN

success - true if the encoding went ok


dmCrypt::Base64Decode(src, src_len, dst, dst_len[in,out])

Base64 decode a buffer

Base64 decode a buffer

PARAMETERS

src - The source data to encode

src_len - key The length of source data in bytes

dst - The destination buffer

dst_len[in,out] - In: The length of the destination in bytes. Out: The length of the decoded string.

RETURN

success - true if the decoding went ok