Expand description
Low-level bindings to OSX/macOS/iOS’s CommonCrypto
library.
Structs§
- CCDigest
Ctx - 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§
- CCDigest
Algorithm - Digest algorithm used in
CCDigest*()
functions. - CCPBKDF
Algorithm - Algorithm for use with
CCKeyDerivationPBKDF()
. - CCPseudo
Random Algorithm - 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.
- CCDigest
Create ⚠ - Allocate and initialize a
CCDigestCtx
for a digest. - CCDigest
Destroy ⚠ - Clear and free a
CCDigestCtx
. - CCDigest
Final ⚠ - Conclude digest operations and produce the digest output. Returns
0
on success. - CCDigest
GetBlock ⚠Size - Provides the block size of the digest algorithm. Returns
0
on failure. - CCDigest
GetBlock ⚠Size From Ref - Provides the block size of the digest algorithm. Returns
0
on failure. - CCDigest
GetDigest ⚠ - Produce the digest output result for the bytes currently processed. Returns
0
on success. - CCDigest
GetOutput ⚠Size - Provides the digest output size of the digest algorithm. Returns
0
on failure. - CCDigest
GetOutput ⚠Size From Ref - Provides the digest output size of the digest algorithm. Returns
0
on failure. - CCDigest
Reset ⚠ - Clear and re-initialize a
CCDigestCtx
for the same algorithm. - CCDigest
Update ⚠ - Continue to digest data. Returns
0
on success. - CCKey
DerivationPBKDF ⚠ - 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.