csrand_init(); initializes the entropy source internally
csrand_get(); returns a random 32-bit unsigned int
csrand_fill(); fills a buffer to a size with random bytes
Invocations of Hashing look like this:hash_ctx hash;
uint8_t out[32];
hash_init(&hash, ALG_NAME) initializes a context of type ALG_NAME
hash_update(&hash, data, len)
hash_final(&hash, out)
hash_mgf1(..., ALG_NAME)
/* Due to the structure of the hash context, the following are
viable alternatives to hash_update and hash_final:
uint8_t out[32];
hash_ctx hash;
hash_init(&hash, SHA256);
hash.update(&hash.Hash, data, len);
hash.final(&hash.Hash, out);
Invocations of HMAC are set up and have the same alternatives as hashing:hmac_init()
hmac_update()
hmac_final()
hmac_pbkdf2(..., ALG_NAME)
The AES cipher is invoked like so:aes_loadkey()
aes_encrypt()
aes_decrypt()
The RSA cipher is invoked like so:rsa_encrypt()
// The RSA encryptor takes a hash ID specifier so that, if other hashes
// are added at some point, they can be used with OAEP internal to RSA.
Digest operations look like this:digest_tostring()
digest_compare()
Quote from: DJ Omnimaga on February 05, 2022, 06:27:57 PMI'm glad to see this worked on still , I wonder how much of this will be of use for your other project TI-Trek? (eg server credentials)TI-Trek does actually use HASHLIB for login, and TI-Trek is actually my method of testing it. TI-Trek's login process is like so:
Page created in 0.066 seconds with 27 queries.