Lines Matching refs:sparam
152 SCRYPT_PARAMS *sparam = SCRYPT_PARAMS_new(); in pkcs5_scrypt_set() local
154 if (sparam == NULL) in pkcs5_scrypt_set()
161 if (ASN1_STRING_set(sparam->salt, salt, saltlen) == 0) in pkcs5_scrypt_set()
164 if (salt == NULL && RAND_bytes(sparam->salt->data, saltlen) <= 0) in pkcs5_scrypt_set()
167 if (ASN1_INTEGER_set_uint64(sparam->costParameter, N) == 0) in pkcs5_scrypt_set()
170 if (ASN1_INTEGER_set_uint64(sparam->blockSize, r) == 0) in pkcs5_scrypt_set()
173 if (ASN1_INTEGER_set_uint64(sparam->parallelizationParameter, p) == 0) in pkcs5_scrypt_set()
179 sparam->keyLength = ASN1_INTEGER_new(); in pkcs5_scrypt_set()
180 if (sparam->keyLength == NULL) in pkcs5_scrypt_set()
182 if (ASN1_INTEGER_set_int64(sparam->keyLength, keylen) == 0) in pkcs5_scrypt_set()
196 if (ASN1_TYPE_pack_sequence(ASN1_ITEM_rptr(SCRYPT_PARAMS), sparam, in pkcs5_scrypt_set()
200 SCRYPT_PARAMS_free(sparam); in pkcs5_scrypt_set()
206 SCRYPT_PARAMS_free(sparam); in pkcs5_scrypt_set()
221 SCRYPT_PARAMS *sparam = NULL; in PKCS5_v2_scrypt_keyivgen_ex() local
230 sparam = ASN1_TYPE_unpack_sequence(ASN1_ITEM_rptr(SCRYPT_PARAMS), param); in PKCS5_v2_scrypt_keyivgen_ex()
232 if (sparam == NULL) { in PKCS5_v2_scrypt_keyivgen_ex()
246 if (sparam->keyLength) { in PKCS5_v2_scrypt_keyivgen_ex()
248 if ((ASN1_INTEGER_get_uint64(&spkeylen, sparam->keyLength) == 0) in PKCS5_v2_scrypt_keyivgen_ex()
255 if (ASN1_INTEGER_get_uint64(&N, sparam->costParameter) == 0 in PKCS5_v2_scrypt_keyivgen_ex()
256 || ASN1_INTEGER_get_uint64(&r, sparam->blockSize) == 0 in PKCS5_v2_scrypt_keyivgen_ex()
257 || ASN1_INTEGER_get_uint64(&p, sparam->parallelizationParameter) == 0 in PKCS5_v2_scrypt_keyivgen_ex()
266 salt = sparam->salt->data; in PKCS5_v2_scrypt_keyivgen_ex()
267 saltlen = sparam->salt->length; in PKCS5_v2_scrypt_keyivgen_ex()
275 SCRYPT_PARAMS_free(sparam); in PKCS5_v2_scrypt_keyivgen_ex()