Crate commoncrypto_sys

Source
Expand description

Low-level bindings to OSX/macOS/iOS’s CommonCrypto library.

Structs§

CCDigestCtx
Context used in CCDigest*() functions.
CC_MD5_CTX
Struct used to generate MD5 hashes.
CC_SHA256_CTX
Struct used to generate SHA2 hashes with the given bits.
CC_SHA512_CTX
Struct used to generate SHA2 hashes with the given bits.
CC_SHA_CTX
Struct used to generate SHA1 hashes.

Enums§

CCDigestAlgorithm
Digest algorithm used in CCDigest*() functions.
CCPBKDFAlgorithm
Algorithm for use with CCKeyDerivationPBKDF().
CCPseudoRandomAlgorithm
Pseudo-random algorithm to use with CCKeyDerivationPBKDF().

Constants§

MD5_DIGEST_LENGTH
Number of bytes for an MD5 hash.
SHA1_DIGEST_LENGTH
Number of bytes for an SHA1 hash.
SHA256_DIGEST_LENGTH
Number of bytes for an SHA256 hash.
SHA384_DIGEST_LENGTH
Number of bytes for an SHA384 hash.
SHA512_DIGEST_LENGTH
Number of bytes for an SHA512 hash.

Functions§

CCDigest
Generic digest hasher.
CCDigestCreate
Allocate and initialize a CCDigestCtx for a digest.
CCDigestDestroy
Clear and free a CCDigestCtx.
CCDigestFinal
Conclude digest operations and produce the digest output. Returns 0 on success.
CCDigestGetBlockSize
Provides the block size of the digest algorithm. Returns 0 on failure.
CCDigestGetBlockSizeFromRef
Provides the block size of the digest algorithm. Returns 0 on failure.
CCDigestGetDigest
Produce the digest output result for the bytes currently processed. Returns 0 on success.
CCDigestGetOutputSize
Provides the digest output size of the digest algorithm. Returns 0 on failure.
CCDigestGetOutputSizeFromRef
Provides the digest output size of the digest algorithm. Returns 0 on failure.
CCDigestReset
Clear and re-initialize a CCDigestCtx for the same algorithm.
CCDigestUpdate
Continue to digest data. Returns 0 on success.
CCKeyDerivationPBKDF
Derive a key from a user-supplied password via PBKDF2.
CC_MD5_Final
Generates MD5 hash. See man 3cc CC_MD5 for details.
CC_MD5_Init
Initializes MD5 hasher. See man 3cc CC_MD5 for details.
CC_MD5_Update
Appends data to be hashed. See man 3cc CC_MD5 for details.
CC_SHA1_Final
Generates SHA1 hash. See man 3cc CC_SHA for details.
CC_SHA1_Init
Initializes SHA1 hasher. See man 3cc CC_SHA for details.
CC_SHA1_Update
Appends data to be hashed. See man 3cc CC_SHA for details.
CC_SHA256_Final
Generates SHA256 hash. See man 3cc CC_SHA for details.
CC_SHA256_Init
Initializes SHA256 hasher. See man 3cc CC_SHA for details.
CC_SHA256_Update
Appends data to be hashed. See man 3cc CC_SHA for details.
CC_SHA384_Final
Generates SHA384 hash. See man 3cc CC_SHA for details.
CC_SHA384_Init
Initializes SHA384 hasher. See man 3cc CC_SHA for details.
CC_SHA384_Update
Appends data to be hashed. See man 3cc CC_SHA for details.
CC_SHA512_Final
Generates SHA512 hash. See man 3cc CC_SHA for details.
CC_SHA512_Init
Initializes SHA512 hasher. See man 3cc CC_SHA for details.
CC_SHA512_Update
Appends data to be hashed. See man 3cc CC_SHA for details.