Lines Matching refs:P

66 static void blake2b_init_param(BLAKE2B_CTX *S, const BLAKE2B_PARAM *P)  in blake2b_init_param()  argument
69 const uint8_t *p = (const uint8_t *)(P); in blake2b_init_param()
72 S->outlen = P->digest_length; in blake2b_init_param()
84 void ossl_blake2b_param_init(BLAKE2B_PARAM *P) in ossl_blake2b_param_init() argument
86 P->digest_length = BLAKE2B_DIGEST_LENGTH; in ossl_blake2b_param_init()
87 P->key_length = 0; in ossl_blake2b_param_init()
88 P->fanout = 1; in ossl_blake2b_param_init()
89 P->depth = 1; in ossl_blake2b_param_init()
90 store32(P->leaf_length, 0); in ossl_blake2b_param_init()
91 store64(P->node_offset, 0); in ossl_blake2b_param_init()
92 P->node_depth = 0; in ossl_blake2b_param_init()
93 P->inner_length = 0; in ossl_blake2b_param_init()
94 memset(P->reserved, 0, sizeof(P->reserved)); in ossl_blake2b_param_init()
95 memset(P->salt, 0, sizeof(P->salt)); in ossl_blake2b_param_init()
96 memset(P->personal, 0, sizeof(P->personal)); in ossl_blake2b_param_init()
99 void ossl_blake2b_param_set_digest_length(BLAKE2B_PARAM *P, uint8_t outlen) in ossl_blake2b_param_set_digest_length() argument
101 P->digest_length = outlen; in ossl_blake2b_param_set_digest_length()
104 void ossl_blake2b_param_set_key_length(BLAKE2B_PARAM *P, uint8_t keylen) in ossl_blake2b_param_set_key_length() argument
106 P->key_length = keylen; in ossl_blake2b_param_set_key_length()
109 void ossl_blake2b_param_set_personal(BLAKE2B_PARAM *P, const uint8_t *personal, in ossl_blake2b_param_set_personal() argument
112 memcpy(P->personal, personal, len); in ossl_blake2b_param_set_personal()
113 memset(P->personal + len, 0, BLAKE2B_PERSONALBYTES - len); in ossl_blake2b_param_set_personal()
116 void ossl_blake2b_param_set_salt(BLAKE2B_PARAM *P, const uint8_t *salt, in ossl_blake2b_param_set_salt() argument
119 memcpy(P->salt, salt, len); in ossl_blake2b_param_set_salt()
120 memset(P->salt + len, 0, BLAKE2B_SALTBYTES - len); in ossl_blake2b_param_set_salt()
127 int ossl_blake2b_init(BLAKE2B_CTX *c, const BLAKE2B_PARAM *P) in ossl_blake2b_init() argument
129 blake2b_init_param(c, P); in ossl_blake2b_init()
137 int ossl_blake2b_init_key(BLAKE2B_CTX *c, const BLAKE2B_PARAM *P, in ossl_blake2b_init_key() argument
140 blake2b_init_param(c, P); in ossl_blake2b_init_key()
146 memcpy(block, key, P->key_length); in ossl_blake2b_init_key()