group
group__libshare__memalg
Cryptographic algorythms supported include a 128-bit, 224-bit, 256-bit, 384-bit, or 512-bit hash digest.
Cryptological and Hash Digest Algorithms
The following algorythms are available for use:
-
SHALG_SHR160 A RIPEMD32 compatible algorithm.
-
SHALG_SHR224 A proprietary 224-bit algorithm with a 28 byte digest.
-
SHALG_SHA1 A 128-bit SHA hash with a 20 byte digest.
-
SHALG_SHA224 A 224-bit SHA hash with a 28 byte digest.
-
SHALG_SHA256 A 256-bit SHA hash with a 32 byte digest.
-
SHALG_SHA384 A 384-bit SHA hash with a 48 byte digest.
-
SHALG_SHA512 A 512-bit SHA hash with a 64 byte digest.
-
SHALG_CRYPT256 A libcrypt compatible SHA 256-bit algorithm.
-
SHALG_CRYPT512 A libcrypt compatible SHA 512-bit algorithm.
The SHALG_CRYPT256 and SHALG_CRYPT512 use the standard SHA-256 and SHA-512 method of "shadow password account validation" used on linux.
The SHALG_SHA1, SHALG_SHA224, SHALG_SHA256, SHALG_SHA384, and SHALG_SHA512 algorythms provide the various implementations of the Secure Hash Algorythm. Supplemental HMAC and HKDF encoding is provided.
The SHALG_ECDSA128R, SHALG_ECDSA160R, SHALG_ECDSA160K, SHALG_ECDSA224R, SHALG_ECDSA224K, SHALG_ECDSA256R, SHALG_ECDSA256K, SHALG_ECDSA384R, and SHALG_ECDSA512R algorythms provide the various implementions of the Elliptic Curve DSA encryption method.
The SHALG_RIPEMD160 algorythm is synonymous with the SHALG_SHR160 algorythm.
The SHALG_SHR160 algorythm provides a private key generation via the RIPEMD160 implementation and a ECDSA256K public-private key validation method.
The SHALG_SHR224 algorythm is a proprietary libshare runtime library. The computation speed to calculate regular or HMAC SHR224 digests is much faster than the SHA or ECDSA algorythms. The method used combines aspects of both checksum computation and bit operations.
Specifications for the Secure Hash Algorithm (SHA) algorithm can be found at "http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf" and "https://tools.ietf.org/html/rfc6234".
Specifications on the Elliptic Curve (ECDSA) algorithm can be found at "http://csrc.nist.gov/publications/fips/fips186-3/fips_186-3.pdf" and "https://www.ietf.org/rfc/rfc6979.txt".
@0
group__libshare__memalg_1gga06fc87d81c62e9abb8790b6e5713c55ba394854ff4f1518f8a047ea885d7d4f60publicSHA1_Message_Block_Size 64group__libshare__memalg_1gga06fc87d81c62e9abb8790b6e5713c55bafb2361a9dd54ccd78a2727ca4c47f792publicSHA224_Message_Block_Size 64group__libshare__memalg_1gga06fc87d81c62e9abb8790b6e5713c55baf163926be4ff6a506a77f737295b6884publicSHA256_Message_Block_Size 64group__libshare__memalg_1gga06fc87d81c62e9abb8790b6e5713c55ba4c82bc2f6b15a4717d5cd8125ca31e03publicSHA384_Message_Block_Size 128group__libshare__memalg_1gga06fc87d81c62e9abb8790b6e5713c55babba971af4f20bede9e0e62472e03e755publicSHA512_Message_Block_Size 128group__libshare__memalg_1gga06fc87d81c62e9abb8790b6e5713c55ba082a5cabbe9ad6382a0606cd0a9c9c47publicUSHA_Max_Message_Block_Size SHA512_Message_Block_Sizegroup__libshare__memalg_1gga06fc87d81c62e9abb8790b6e5713c55bae6b440886f3edd40e1854e8bb5406835publicSHA1HashSize 20group__libshare__memalg_1gga06fc87d81c62e9abb8790b6e5713c55ba8f590c65273a356a4703c90cc1f1584fpublicSHA224HashSize 28group__libshare__memalg_1gga06fc87d81c62e9abb8790b6e5713c55ba3a8b66cf5d0bd8cc0e375a86a754ab28publicSHA256HashSize 32group__libshare__memalg_1gga06fc87d81c62e9abb8790b6e5713c55ba1f2e28eb98ef458a8c54e32e9cbe3322publicSHA384HashSize 48group__libshare__memalg_1gga06fc87d81c62e9abb8790b6e5713c55ba9c2b656e2a8c7b981612de8ddaf2f7bepublicSHA512HashSize 64group__libshare__memalg_1gga06fc87d81c62e9abb8790b6e5713c55bab3907d0aaeac7086349a0c920c301145publicUSHAMaxHashSize SHA512HashSizegroup__libshare__memalg_1gga06fc87d81c62e9abb8790b6e5713c55ba3cee11b61cecb950ddad59399caab2e3publicSHA1HashSizeBits 160group__libshare__memalg_1gga06fc87d81c62e9abb8790b6e5713c55ba1d000b90626950f5ceae6353d4648e59publicSHA224HashSizeBits 224group__libshare__memalg_1gga06fc87d81c62e9abb8790b6e5713c55baf8b7a9e3bd026320a4b418bc35ba21a7publicSHA256HashSizeBits 256group__libshare__memalg_1gga06fc87d81c62e9abb8790b6e5713c55ba2bf86ed4893af8bff6df06951fcd65dfpublicSHA384HashSizeBits 384group__libshare__memalg_1gga06fc87d81c62e9abb8790b6e5713c55ba44595cd183133d2dca15294777f6b6ebpublicSHA512HashSizeBits 512group__libshare__memalg_1gga06fc87d81c62e9abb8790b6e5713c55baeb9a635b6c798bf545965b19aef992fdpublicUSHAMaxHashSizeBits SHA512HashSizeBits
typedef uint32_t shalg_t[78]
A key or signature.
typedef unsigned char shcr224_t[96]
char* shhex_str
(unsigned char *data, size_t data_len)
void shhex_bin
(char *hex_str, unsigned char *data, size_t data_max)
const char* shalg_str
(int alg)
Print the algorythm parameters.
int shalg_fmt
(char *label)
char* shalg_fmt_str
(int fmt)
char* shalg_encode
(int fmt, unsigned char *data, size_t data_len)
Print a binary segment in the format specified.
int shalg_decode
(int fmt, char *in_data, unsigned char *data, size_t *data_len_p)
int shalg_priv_rand
(int alg, shalg_t ret_key)
Generate a random 512-bit private signature.
int shalg_priv
(int alg, shalg_t ret_key, unsigned char *data, size_t data_len)
Generate a private signature from a 'secret' binary segment.
char* shalg_print
(int fmt, shalg_t key)
Print a key or signature in the format specified.
int shalg_gen
(int fmt, char *in_data, shalg_t ret_key)
int shalg_pub
(int alg, shalg_t priv_key, shalg_t ret_key)
Generate a public key from a private key.
int shalg_sign
(int alg, shalg_t priv_key, shalg_t ret_sig, unsigned char *data, size_t data_len)
int shalg_ver
(int alg, shalg_t pub_key, shalg_t sig_key, unsigned char *data, size_t data_len)
int shalg_mode_str
(char *mode_str)
int shalg_cmp
(shalg_t alg_a, shalg_t alg_b)
int shsha_hex
(int alg, unsigned char *ret_digest, unsigned char *data, size_t data_len)
Digest a single message into hexadecimal format.
int shsha
(int alg, unsigned char *ret_bin, unsigned char *data, size_t data_len)
Digest a single message into binary format.
size_t shsha_size
(int alg)
The byte size of the resulting SHA digest hash.
int shsha_init
(sh_sha_t *ctx, int alg)
int shsha_write
(sh_sha_t *ctx, unsigned char *data, size_t data_len)
int shsha_result
(sh_sha_t *ctx, unsigned char *ret_bin)
int shhmac
(int alg, unsigned char *key, size_t key_len, const unsigned char *message_array, int length, unsigned char *digest)
This function will compute an HMAC message digest.
Param
alg
One of SHALG_SHA1, SHALG_SHA224, SHALG_SHA256, SHALG_SHA384, or SHALG_SHA512.
message_array
An array of octets representing the message.
length
The length of the message in message_array.
key
The secret shared key.
key_len
The length of the secret shared key.
digest
Where the digest is to be returned.
Return Value
A libshare error code.
Note
The length of the digest is determined by the value of whichSha.
int shhmac_init
(sh_hmac_t *context, int alg, unsigned char *key, int key_len)
This function will initialize the hmacContext in preparation for computing a new HMAC message digest.
Param
context
The context to reset.
alg
One of SHALG_SHA1, SHALG_SHA224, SHALG_SHA256, SHALG_SHA384, or SHALG_SHA512.
key
The secret shared key.
key_len
The length of the secret shared key.
Return Value
A libshare error code.
int shhmac_write
(sh_hmac_t *context, const unsigned char *text, int text_len)
Accepts an array of octets as the next portion of the message.
Param
context
The HMAC context to update.
text
An array of octets representing the next portion of the message.
text_len
The length of the message in text.
Return Value
A libshare error code.
Note
This function may be called multiple times.
int shhmac_result
(sh_hmac_t *context, uint8_t *digest)
This function will return the N-byte message digest into the Message_Digest array provided by the caller.
Param
context
The context to use to calculate the HMAC hash.
digest
Where the digest is returned.
Return Value
A libshare error code.
Note
The length of the hash is determined by the value of alg that was passed to hmacReset().
int shhkdf
(int alg, unsigned char *salt, int salt_len, unsigned char *ikm, int ikm_len, unsigned char *info, int info_len, uint8_t *okm, int okm_len)
The HKDF algorithm (HMAC-based Extract-and-Expand Key Derivation Function, RFC 5869), expressed in terms of the various SHA algorithms.
Param
alg
One of SHA1, SHA224, SHA256, SHA384, SHA512
salt
The optional salt value (a non-secret random value); if not provided (salt == NULL), it is set internally to a string of HashLen(whichSha) zeros.
salt_len
The length of the salt value. (Ignored if salt == NULL.)
ikm
Input keying material.
ikm_len
The length of the input keying material.
info
The optional context and application specific information. If info == NULL or a zero-length string, it is ignored.
info_len
The length of the optional context and application specific information. (Ignored if info == NULL.)
okm
Where the HKDF is to be stored.
okm_len
The length of the buffer to hold okm. okm_len must be <= 255 * shsha_size(alg) * 2
Return Value
A libshare error code.
int shhkdf_extract
(int alg, unsigned char *salt, int salt_len, unsigned char *ikm, int ikm_len, uint8_t *prk)
This function will perform HKDF extraction.
Param
alg
One of SHALG_SHA1, SHALG_SHA224, SHALG_SHA256, SHALG_SHA384, SHALG_SHA512
salt
The optional salt value (a non-secret random value); if not provided (salt == NULL), it is set internally to a string of HashLen(whichSha) zeros.
salt_len
The length of the salt value. (Ignored if salt == NULL.)
ikm[
] Input keying material.
ikm_len
The length of the input keying material.
prk
Array where the HKDF extraction is to be stored. Must be larger than shsha_size(alg)
Return Value
A libshare error code.
int shhkdf_expand
(int alg, uint8_t *prk, int prk_len, unsigned char *info, int info_len, uint8_t *okm, int okm_len)
This function will perform HKDF expansion.
Param
whichSha
One of SHA1, SHA224, SHA256, SHA384, SHA512
prk
The pseudo-random key to be expanded; either obtained directly from a cryptographically strong, uniformly distributed pseudo-random number generator, or as the output from hkdfExtract().
prk_len
The length of the pseudo-random key in prk; should at least be equal to shsha_size(alg).
info
The optional context and application specific information. If info == NULL or a zero-length string, it is ignored.
info_len
The length of the optional context and application specific information. (Ignored if info == NULL.)
okm
Where the HKDF is to be stored.
okm_len
The length of the buffer to hold okm. The okm_len must be <= 255 * shsha_size(alg) * 2.
Return Value
A libshare error code.
int shhkdf_init
(sh_hkdf_t *context, int alg, unsigned char *salt, int salt_len)
This function will initialize the hkdfContext in preparation for key derivation using the modular HKDF interface for arbitrary length inputs.
Param
context
The context to reset.
alg
One of SHALG_SHA1, SHALG_SHA224, SHALG_SHA256, SHALG_SHA384, or SHALG_SHA512.
salt
The optional salt value (a non-secret random value); if not provided (salt == NULL), it is set internally to a string of HashLen(whichSha) zeros.
salt_len
The length of the salt value. (Ignored if salt == NULL.)
Return Value
A libshare error code.
int shhkdf_write
(sh_hkdf_t *context, unsigned char *ikm, int ikm_len)
This function accepts an array of octets as the next portion of the input keying material.
Param
context
The HKDF context to update.
ikm
An array of octets representing the next portion of the input keying material.
ikm_len
The length of ikm.
Return Value
A libshare error code.
Note
This function may be called multiple times.
int shhkdf_result
(sh_hkdf_t *context, uint8_t *prk, unsigned char *info, int info_len, uint8_t *okm, int okm_len)
This function will finish the HKDF extraction and perform the final HKDF expansion.
Param
context
The HKDF context to use to calculate the HKDF hash.
prk
NULL or a location to store the HKDF extraction. The buffer must be larger than shsha_size(whichSha).
info
NULL or context and application specific information.
info_len
The length of the optional context and application specific
okm
Where the HKDF is to be stored.
okm_len
The length of the buffer to hold okm. The okm_len must be <= 255 * shsha_size(whichSha) * 2
Return Value
A libshare error code.
int sh_sha1_init
(sh_sha_t *sha)
This function will initialize the in preparation for computing a new SHA1 message digest.
sh_sha1_t
structsh__sha1__t
compound
Param
context
The context to reset [in/out]
Return Value
A share error code.
int sh_sha1_write
(sh_sha_t *sha, const uint8_t *message_array, unsigned length)
This function accepts an array of octets as the next portion of the message.
Param
context
The SHA context to update. [in/out]
message_array
An array of octets representing the next portion of the message.
length
The length of the message in message_array. [in]
Return Value
A libshare error code.
int sh_sha1_result
(sh_sha_t *sha, uint8_t *Message_Digest)
This function will return the 160-bit message digest into the Message_Digest array provided by the caller.
Param
context
The context to use to calculate the SHA-1 hash.
Message_Digest
Where the digest is returned.
Return Value
A libshare error code.
Note
The first octet of hash is stored in the element with index 0, the last octet of hash in the element with index 19.
void sh_sha224
(const unsigned char *message, unsigned int len, unsigned char *digest)
int sh_sha256_init
(sh_sha_t *sha)
This function will initialize the in preparation for computing a new SHA256 message digest.
sh_sha256_t
structsh__sha256__t
compound
Param
context
The context to reset.
Return Value
A libshare error code.
int sh_sha256_write
(sh_sha_t *sha, const uint8_t *message_array, unsigned int length)
This function accepts an array of octets as the next portion of the message.
Param
context
The SHA context to update.
message_array
An array of octets representing the next portion of the message.
length
The length of the message in message_array.
Return Value
A libshare error code.
int sh_sha256_result
(sh_sha_t *sha, uint8_t *Message_Digest)
This function will return the 256-bit message digest into the Message_Digest array provided by the caller.
Param
context
The context to use to calculate the SHA hash.
Message_Digest
Where the digest is returned.
Return Value
A libshare error code.
Note
The first octet of hash is stored in the element with index 0. The last octet of hash in the element with index 31.
void sh_sha256
(const unsigned char *message, unsigned int len, unsigned char *digest)
int sh_sha512_init
(sh_sha_t *sha)
This function will initialize the in preparation for computing a new SHA512 message digest.
sh_sha512_t
structsh__sha512__t
compound
Param
context
The context to reset.
Return Value
A libshare error code.
int sh_sha512_write
(sh_sha_t *sha, const uint8_t *message_array, unsigned int length)
This function accepts an array of octets as the next portion of the message.
Param
context
The SHA context to update.
message_array
An array of octets representing the next portion of the message.
length
The length of the message in message_array.
Return Value
A libshare error code.
int sh_sha512_result
(sh_sha_t *sha, uint8_t *Message_Digest)
This function will return the 512-bit message digest into the Message_Digest array provided by the caller.
Param
context
The context to use to calculate the SHA hash.
Message_Digest
Where the digest is returned.
Return Value
A libshare error code.
Note
The first octet of hash is stored in the element with index 0, * the last octet of hash in the element with index 63.
void sh_sha512
(const unsigned char *message, unsigned int len, unsigned char *digest)
char* shdigest
(void *data, int32_t len)
void sh_ripemd160
(unsigned char *data, size_t data_len, sh160_t digest)
Generate a RIPEMD160 20-byte hash from a binary segment.
uint32_t shsha_2fa
(char *secret_str)
Param
secret_str
A 16 character "base 32" string.
Return Value
A pin that will invalidate after aproximately one minute.
int shsha_2fa_verify
(char *secret_str, uint32_t pin)
Param
secret_str
A 16 character "base 32" string.
Return Value
0 on success and SHERR_ACCESS when pin is invalid.
char* shsha_2fa_secret
(void)
Generate a random secret key usable for 2fa purposes.
Return Value
A 16-character string in base-32 format.
uint32_t shsha_2fa_bin
(int alg, unsigned char *secret, size_t secret_len, int freq)
int shsha_2fa_bin_verify
(int alg, unsigned char *secret, size_t secret_len, int freq, uint32_t pin)
void shsha_2fa_secret_bin
(unsigned char *secret, size_t secret_len)
char* shcrypt
(const char *passwd, const char *salt)
char* shcrypt_sha256
(const char *key, const char *salt)
char* shcrypt_sha512
(const char *key, const char *salt)
void shcrypt_b64_encode
(char *ret_str, unsigned char *data, size_t data_len)
void shcrypt_b64_decode
(char *str, unsigned char *data, size_t *data_len_p)
shkey_t* shecdsa_key
(char *hex_str)
shkey_t* shecdsa_key_priv
(char *hex_seed)
shkey_t* shecdsa_key_pub
(shkey_t *priv_key)
const char* shecdsa_pub
(const char *hex_str)
int shecdsa_sign
(shkey_t *priv_key, char *sig_r, char *sig_s, unsigned char *data, size_t data_len)
int shecdsa_verify
(shkey_t *pub_key, char *str_r, char *str_s, unsigned char *data, size_t data_len)
char* shecdsa_hd_seed
(char *seed_hex, char *chain)
Generate a private key from the given seed context.
Param
seed_hex
A seed for the private key in hexadecimal format.
Return Value
A private key (32 bytes) in hexadecimal string.
char* shecdsa_hd_pubkey
(char *pubkey, char *chain, uint32_t idx)
Param
pubkey
The parent pubkey (65 bytes) in hexadecimal format.
chain
The parent chain (32 bytes) in hexadecimal format. This value is over-written with the new chain sequence.
idx
The sequence number in the derived set.
Return Value
A hexadecimal public key (65 bytes) in hexadecimal format.
char* shecdsa_hd_privkey
(char *secret, char *chain, uint32_t idx)
Param
pubkey
The parent pubkey (65 bytes) in hexadecimal format.
chain
The parent chain (32 bytes) in hexadecimal format. This value is over-written with the new chain sequence.
seed
The parent's secret key (32 bytes) in hexadecimal format.
idx
The sequence number in the derived set.
Return Value
A hexadecimal private key (32 bytes) in hexadecimal format.
char* shecdsa_hd_par_pub
(char *p_secret, char *p_chain, uint32_t idx)
char* shecdsa_hd_recover_pub
(char *secret)
int shecdsa_hd_sign
(char *privkey_hex, char *sig_r, char *sig_s, char *hash_hex)
int shecdsa_hd_verify
(char *pubkey_hex, char *str_r, char *str_s, char *hash_hex)
shec_t* shec_init
(int alg)
void shec_free
(shec_t **ec_p)
char* shec_priv
(shec_t *ec)
char* shec_priv_gen
(shec_t *ec, unsigned char *data, size_t data_len)
void shec_priv_set
(shec_t *ec, char *hex_priv)
char* shec_priv_rand
(shec_t *ec)
char* shec_pub
(shec_t *ec)
char* shec_pub_gen
(shec_t *ec)
int shec_sign
(shec_t *ec, unsigned char *data, size_t data_len)
int shec_signstr
(shec_t *ec, char *data)
int shec_signnull
(shec_t *ec)
int shec_ver
(shec_t *ec, unsigned char *data, size_t data_len)
int shec_verstr
(shec_t *ec, char *data)
int shec_vernull
(shec_t *ec)
shkey_t* shec_priv_key
(shec_t *ec)
int shec_priv_key_set
(shec_t *ec, shkey_t *key)
shkey_t* shec_pub_key
(shec_t *ec)
int shec_pub_key_set
(shec_t *ec, shkey_t *key)
int shec_pub_set
(shec_t *ec, char *hex_pub)
int shec_sig_set
(shec_t *ec, char *hex_sig)
int shcr224_verify
(char *salt, char *sig, char *data)
int shcr224_bin_verify
(unsigned char salt_key[28], shcr224_t sig, unsigned int rounds, unsigned char *data, size_t data_len)
int shcr224
(char *salt, char *data, char *ret_str)
int shcr224_bin
(unsigned char salt_key[28], shcr224_t ret_key, unsigned int rounds, unsigned char *data, size_t data_len)
Generate a signature, from the salt provided, that can be used in order to authenticate a password.
char* shcr224_salt
(unsigned int rounds)
int shcr224_salt_bin
(unsigned char ret_key[28])
Generate a random salt.
char* shcr224_salt_gen
(unsigned int rounds, unsigned char *data, size_t data_len)
int shcr224_salt_bin_gen
(unsigned char ret_key[28], unsigned char *data, size_t data_len)
uint32_t shcsum_crc32
(uint32_t crc, unsigned char *buf, size_t len)
uint32_t shcsum_crc32_combine
(uint32_t crc1, uint32_t crc2, size_t len2)
uint32_t shcsum_adler32
(uint32_t adler, unsigned char *buf, size_t len)
uint32_t shcsum_adler32_combine
(uint32_t adler1, uint32_t adler2, size_t len2)
SHALG_128BIT
(1 << 0)
A 16-byte hash.
SHALG_160BIT
(1 << 1)
A 20-byte hash.
SHALG_224BIT
(1 << 2)
A 28-byte hash.
SHALG_256BIT
(1 << 3)
A 32-byte hash.
SHALG_384BIT
(1 << 4)
A 48-byte hash.
SHALG_512BIT
(1 << 5)
A 64-byte hash.
SHALG_SHR
(1 << 8)
Share Library Algorythm.
SHALG_SHA
(1 << 9)
Secure Hash Algorythm.
SHALG_RSA
(1 << 10)
Pubkey Encryption Algorythm (circa 1977).
SHALG_ECDSA
(1 << 11)
Elliptic Curve Algorythm.
SHALG_VR
(1 << 15)
Indicates that the algorythm is 'verifiably random'.
SHALG_SHR160
(SHALG_SHR | SHALG_160BIT)
The libshare 160-bit hash algorithm.
SHALG_SHR224
(SHALG_SHR | SHALG_224BIT)
The libshare 224-bit hash algorithm.
SHALG_SHCR224
(SHALG_CRYPT | SHALG_SHR | SHALG_224BIT)
The libshare 224-bit "crypt" hash algorithm designed towards password authentication purposes.
SHALG_SHA1
(SHALG_SHA | SHALG_128BIT)
SHALG_SHA224
(SHALG_SHA | SHALG_224BIT)
SHALG_SHA256
(SHALG_SHA | SHALG_256BIT)
SHALG_SHA384
(SHALG_SHA | SHALG_384BIT)
SHALG_SHA512
(SHALG_SHA | SHALG_512BIT)
SHALG_ECDSA128R
(SHALG_ECDSA | SHALG_128BIT | SHALG_VR)
SHALG_ECDSA160R
(SHALG_ECDSA | SHALG_160BIT | SHALG_VR)
SHALG_ECDSA160K
(SHALG_ECDSA | SHALG_160BIT)
SHALG_ECDSA224R
(SHALG_ECDSA | SHALG_224BIT | SHALG_VR)
SHALG_ECDSA224K
(SHALG_ECDSA | SHALG_224BIT)
SHALG_ECDSA256R
(SHALG_ECDSA | SHALG_256BIT | SHALG_VR)
SHALG_ECDSA256K
(SHALG_ECDSA | SHALG_256BIT)
SHALG_ECDSA384R
(SHALG_ECDSA | SHALG_384BIT | SHALG_VR)
SHALG_ECDSA512R
(SHALG_ECDSA | SHALG_512BIT | SHALG_VR)
SHALG_RSA128
(SHALG_RSA | SHALG_128BIT)
SHALG_CRYPT256
(SHALG_CRYPT | SHALG_256BIT)
SHALG_CRYPT512
(SHALG_CRYPT | SHALG_512BIT)
SHALG_DEFAULT
0
An indicator to use the default available algorythm.
SHALG_SHKEY
0
A generic 224-bit key generated by the shkey() function set.
SHALG_RIPEMD160
SHALG_SHR160
A convience macro for referencing the RIPEMD160 algorythm.
SHALG
((_alg) == (_flag))
Return Value
TRUE if the alg matches the given flags
MAX_ALG_SIZE
((MAX_ALG_WORD_SIZE - 1) * sizeof(uint32_t))
shalg_size
((_a)[MAX_ALG_WORD_SIZE - 1])
SHCR224_DEFAULT_ROUNDS
SHCR224_MIN_ROUNDS