SDK Crypt API documentation

Version: stable

FUNCTION
dmCrypt::HashSha1() Hash buffer using SHA1
dmCrypt::HashSha256() Hash buffer using SHA256
dmCrypt::HashSha512() Hash buffer using SHA512
dmCrypt::HashMd5() Hash buffer using MD5
dmCrypt::Base64Encode() Base64 encode a buffer
dmCrypt::Base64Decode() Base64 decode a buffer

Functions

dmCrypt::HashSha1()

dmCrypt::HashSha1(buf,buflen,digest)

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()

dmCrypt::HashSha256(buf,buflen,digest)

Hash buffer using SHA256

PARAMETERS

buf
  The source data to hash
buflen The length of source data in bytes
digest The destination buffer (32 bytes)

dmCrypt::HashSha512()

dmCrypt::HashSha512(buf,buflen,digest)

Hash buffer using SHA512

PARAMETERS

buf
  The source data to hash
buflen The length of source data in bytes
digest The destination buffer (64 bytes)

dmCrypt::HashMd5()

dmCrypt::HashMd5(buf,buflen,digest)

Hash buffer using MD5

PARAMETERS

buf
  The source data to hash
buflen The length of source data in bytes
digest The destination buffer (16 bytes)

dmCrypt::Base64Encode()

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

Base64 encode a buffer

PARAMETERS

src
          The source data to encode
src_len
      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.

RETURNS

true if the encoding went ok

dmCrypt::Base64Decode()

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

Base64 decode a buffer

PARAMETERS

src
          The source data to encode
src_len
      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.

RETURNS

true if the decoding went ok