Copyright © 2010-2012 ALEPH ARCHIVES Ltd. All rights reserved.
Version: 1.0.0
Behaviours: ?GEN_SERVER.
Authors: Aleph Archives Ltd. [web site: http://aleph-archives.com/].
WSDK crypto functions
This module provides a set of cryptographic functions.
References:passwd_modes() = alphanum | mixed | numeric | alpha
digest_to_hex/1 | Provides a string representation of the Hexadecimal value of a digest (MD5, SHA1, SHA224, SHA256, SHA384, and SHA512). |
md5/1 | Computes an MD5 message digest from Data, where the length of the digest is 128 bits (16 bytes). |
md5/2 | Finishes the update of an MD5 Context and returns the computed MD5 message digest. |
md5/3 | Updates an MD5 Context with Data, and returns a NewContext. |
passwd/0 | Generate an 8 length alphanum password. |
passwd/1 | Generate an 'alphanum' password of size Length. |
passwd/2 | Generate a password of size Length and type Type,. |
sha1/1 | Computes an SHA message digest from Data, where the length of the digest is 160 bits (20 bytes). |
sha1/2 | Finishes the update of an SHA Context and returns the computed SHA message digest. |
sha1/3 | Updates an SHA Context with Data, and returns a NewContext. |
sha224/1 | Computes a SHA-224 message digest from Data, where the length of the digest is 224 bits (28 bytes). |
sha224/2 | Finishes the update of a SHA-224 Context and returns the computed message digest. |
sha224/3 | Updates a SHA-224 context with message data and returns a new context. |
sha256/1 | Computes a SHA-256 message digest from Data, where the length of the digest is 256 bits (32 bytes). |
sha256/2 | Finishes the update of a SHA-256 Context and returns the computed message digest. |
sha256/3 | Updates a SHA-256 context with message data and returns a new context. |
sha384/1 | Computes a SHA-384 message digest from Data, where the length of the digest is 384 bits (32 bytes). |
sha384/2 | Finishes the update of a SHA-384 Context and returns the computed message digest. |
sha384/3 | Updates a SHA-384 context with message data and returns a new context. |
sha512/1 | Computes a SHA-512 message digest from Data, where the length of the digest is 512 bits (64 bytes). |
sha512/2 | Finishes the update of a SHA-512 Context and returns the computed message digest. |
sha512/3 | Updates a SHA-512 context with message data and returns a new context. |
digest_to_hex(BinDigest::binary()) -> [byte()]
Provides a string representation of the Hexadecimal value of a digest (MD5, SHA1, SHA224, SHA256, SHA384, and SHA512).
md5(Selector::init | iodata()) -> binary()
Computes an MD5 message digest from Data, where the length of the digest is 128 bits (16 bytes).
When 'init' is passed, creates an MD5 context to be used in subsequent calls to md5/3md5(Selector::final, Ctx::binary()) -> binary()
Finishes the update of an MD5 Context and returns the computed MD5 message digest.
md5(Selector::update, Ctx::binary(), Data::iodata()) -> binary()
Updates an MD5 Context with Data, and returns a NewContext.
passwd() -> [byte()]
Generate an 8 length alphanum password.
This is equivalent to call:wsdk_crypto:passwd(8)
.
passwd(Length::non_neg_integer()) -> [byte()]
Generate an 'alphanum' password of size Length.
This is equivalent to call:wsdk_crypto:passwd(Length, 'alphanum')
.
passwd(Length::non_neg_integer(), Mode::passwd_modes()) -> [byte()]
Generate a password of size Length and type Type,
where Type could be: alpha | alphanum | mixed | numeric |sha1(Selector::init | iodata()) -> binary()
Computes an SHA message digest from Data, where the length of the digest is 160 bits (20 bytes).
When 'init' is passed, creates an SHA context to be used in subsequent calls to sha1/3sha1(Selector::final, Ctx::binary()) -> binary()
Finishes the update of an SHA Context and returns the computed SHA message digest.
sha1(Selector::update, Ctx::binary(), Data::iodata()) -> binary()
Updates an SHA Context with Data, and returns a NewContext.
sha224(Selector::init | iodata()) -> binary()
Computes a SHA-224 message digest from Data, where the length of the digest is 224 bits (28 bytes).
When 'init' is passed, it creates a SHA-224 context to be in subsequent calls to sha224/3.sha224(Selector::final, Ctx::binary()) -> binary()
Finishes the update of a SHA-224 Context and returns the computed message digest.
sha224(Selector::update, Ctx::binary(), Data::iodata()) -> binary()
Updates a SHA-224 context with message data and returns a new context.
sha256(Selector::init | iodata()) -> binary()
Computes a SHA-256 message digest from Data, where the length of the digest is 256 bits (32 bytes).
When 'init' is passed, it creates a SHA-256 context to be in subsequent calls to sha256/3.sha256(Selector::final, Ctx::binary()) -> binary()
Finishes the update of a SHA-256 Context and returns the computed message digest.
sha256(Selector::update, Ctx::binary(), Data::iodata()) -> binary()
Updates a SHA-256 context with message data and returns a new context.
sha384(Selector::init | iodata()) -> binary()
Computes a SHA-384 message digest from Data, where the length of the digest is 384 bits (32 bytes).
When 'init' is passed, it creates a SHA-384 context to be in subsequent calls to sha384/3.sha384(Selector::final, Ctx::binary()) -> binary()
Finishes the update of a SHA-384 Context and returns the computed message digest.
sha384(Selector::update, Ctx::binary(), Data::iodata()) -> binary()
Updates a SHA-384 context with message data and returns a new context.
sha512(Selector::init | iodata()) -> binary()
Computes a SHA-512 message digest from Data, where the length of the digest is 512 bits (64 bytes).
When 'init' is passed, it creates a SHA-512 context to be in subsequent calls to sha512/3.sha512(Selector::final, Ctx::binary()) -> binary()
Finishes the update of a SHA-512 Context and returns the computed message digest.
sha512(Selector::update, Ctx::binary(), Data::iodata()) -> binary()
Updates a SHA-512 context with message data and returns a new context.
Generated by EDoc, Sep 5 2012, 17:38:08.