Lines Matching refs:P
59 static void blake2s_init_param(BLAKE2S_CTX *S, const BLAKE2S_PARAM *P) in blake2s_init_param() argument
62 const uint8_t *p = (const uint8_t *)(P); in blake2s_init_param()
65 S->outlen = P->digest_length; in blake2s_init_param()
76 void ossl_blake2s_param_init(BLAKE2S_PARAM *P) in ossl_blake2s_param_init() argument
78 P->digest_length = BLAKE2S_DIGEST_LENGTH; in ossl_blake2s_param_init()
79 P->key_length = 0; in ossl_blake2s_param_init()
80 P->fanout = 1; in ossl_blake2s_param_init()
81 P->depth = 1; in ossl_blake2s_param_init()
82 store32(P->leaf_length, 0); in ossl_blake2s_param_init()
83 store48(P->node_offset, 0); in ossl_blake2s_param_init()
84 P->node_depth = 0; in ossl_blake2s_param_init()
85 P->inner_length = 0; in ossl_blake2s_param_init()
86 memset(P->salt, 0, sizeof(P->salt)); in ossl_blake2s_param_init()
87 memset(P->personal, 0, sizeof(P->personal)); in ossl_blake2s_param_init()
90 void ossl_blake2s_param_set_digest_length(BLAKE2S_PARAM *P, uint8_t outlen) in ossl_blake2s_param_set_digest_length() argument
92 P->digest_length = outlen; in ossl_blake2s_param_set_digest_length()
95 void ossl_blake2s_param_set_key_length(BLAKE2S_PARAM *P, uint8_t keylen) in ossl_blake2s_param_set_key_length() argument
97 P->key_length = keylen; in ossl_blake2s_param_set_key_length()
100 void ossl_blake2s_param_set_personal(BLAKE2S_PARAM *P, const uint8_t *personal, in ossl_blake2s_param_set_personal() argument
103 memcpy(P->personal, personal, len); in ossl_blake2s_param_set_personal()
104 memset(P->personal + len, 0, BLAKE2S_PERSONALBYTES - len); in ossl_blake2s_param_set_personal()
107 void ossl_blake2s_param_set_salt(BLAKE2S_PARAM *P, const uint8_t *salt, in ossl_blake2s_param_set_salt() argument
110 memcpy(P->salt, salt, len); in ossl_blake2s_param_set_salt()
111 memset(P->salt + len, 0, BLAKE2S_SALTBYTES - len);} in ossl_blake2s_param_set_salt()
117 int ossl_blake2s_init(BLAKE2S_CTX *c, const BLAKE2S_PARAM *P) in ossl_blake2s_init() argument
119 blake2s_init_param(c, P); in ossl_blake2s_init()
127 int ossl_blake2s_init_key(BLAKE2S_CTX *c, const BLAKE2S_PARAM *P, in ossl_blake2s_init_key() argument
130 blake2s_init_param(c, P); in ossl_blake2s_init_key()
136 memcpy(block, key, P->key_length); in ossl_blake2s_init_key()