/libcore/luni/src/main/java/java/security/spec/ |
PSSParameterSpec.java | 50 private final int saltLen; 56 * @param saltLen 59 * if {@code saltLen} is negative. 61 public PSSParameterSpec(int saltLen) { 62 if (saltLen < 0) { 63 throw new IllegalArgumentException("saltLen < 0"); 65 this.saltLen = saltLen; 83 * @param saltLen 88 * if {@code saltLen} or {@code trailerField} is negative [all...] |
/external/dropbear/libtomcrypt/src/pk/pkcs1/ |
pkcs_1_pss_encode.c | 24 @param saltlen The length of the salt desired (octets) 34 unsigned long saltlen, prng_state *prng, 60 if ((saltlen > modulus_len) || (modulus_len < hLen + saltlen + 2)) { 87 if (saltlen > 0) { 88 if (prng_descriptor[prng_idx].read(salt, saltlen, prng) != saltlen) { 105 if ((err = hash_descriptor[hash_idx].process(&md, salt, saltlen)) != CRYPT_OK) { 112 /* generate DB = PS || 0x01 || salt, PS == modulus_len - saltlen - hLen - 2 zero bytes */ 114 XMEMSET(DB + x, 0, modulus_len - saltlen - hLen - 2) [all...] |
pkcs_1_pss_decode.c | 26 @param saltlen The length of the salt used (octets) 34 unsigned long saltlen, int hash_idx, 57 if ((saltlen > modulus_len) || 58 (modulus_len < hLen + saltlen + 2) || (siglen != modulus_len)) { 117 /* DB = PS || 0x01 || salt, PS == modulus_len - saltlen - hLen - 2 zero bytes */ 120 for (x = 0; x < modulus_len - saltlen - hLen - 2; x++) { 144 if ((err = hash_descriptor[hash_idx].process(&md, DB+x, saltlen)) != CRYPT_OK) {
|
/external/dropbear/libtomcrypt/testprof/ |
pkcs_1_test.c | 9 unsigned long x, y, l1, l2, l3, i1, i2, lparamlen, saltlen, modlen; local 33 /* pick a random saltlen 0..16 */ 34 saltlen = abs(rand()) % 17; 63 DO(pkcs_1_pss_encode(buf[0], l3, saltlen, &yarrow_prng, prng_idx, hash_idx, modlen, buf[1], &l1)); 64 DO(pkcs_1_pss_decode(buf[0], l3, buf[1], l1, saltlen, hash_idx, modlen, &res1)); 67 DO(pkcs_1_pss_decode(buf[0], l3, buf[1], l1, saltlen, hash_idx, modlen, &res2)); 71 pkcs_1_pss_decode(buf[0], l3, buf[1], l1, saltlen, hash_idx, modlen, &res3); 73 fprintf(stderr, "PSS failed: %d, %d, %d, %lu, %lu\n", res1, res2, res3, l3, saltlen);
|
/frameworks/base/core/jni/ |
android_content_res_ObbScanner.cpp | 65 size_t saltLen; 66 const unsigned char* salt = obb->getSalt(&saltLen); 67 if (saltLen > 0) { 68 jbyteArray saltArray = env->NewByteArray(saltLen); 69 env->SetByteArrayRegion(saltArray, 0, saltLen, (jbyte*)salt);
|
/external/openssl/crypto/pkcs12/ |
p12_mutl.c | 73 int saltlen, iter; local 83 saltlen = p12->mac->salt->length; 94 if(!PKCS12_key_gen (pass, passlen, salt, saltlen, PKCS12_MAC_ID, iter, 129 unsigned char *salt, int saltlen, int iter, const EVP_MD *md_type) 135 if (PKCS12_setup_mac (p12, iter, salt, saltlen, md_type) == 152 int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, int saltlen, 166 if (!saltlen) saltlen = PKCS12_SALT_LEN; 167 p12->mac->salt->length = saltlen; 168 if (!(p12->mac->salt->data = OPENSSL_malloc (saltlen))) { [all...] |
p12_key.c | 78 int saltlen, int id, int iter, int n, unsigned char *out, 92 ret = PKCS12_key_gen_uni(unipass, uniplen, salt, saltlen, 104 int saltlen, int id, int iter, int n, unsigned char *out, 131 fprintf(stderr, "Salt (length %d):\n", saltlen); 132 h__dump(salt, saltlen); 141 Slen = v * ((saltlen+v-1)/v); 152 for (i = 0; i < Slen; i++) *p++ = salt[i % saltlen];
|
p12_p8e.c | 65 unsigned char *salt, int saltlen, int iter, 76 if(pbe_nid == -1) pbe = PKCS5_pbe2_set(cipher, iter, salt, saltlen); 77 else pbe = PKCS5_pbe_set(pbe_nid, iter, salt, saltlen);
|
p12_crpt.c | 73 int saltlen, iter, ret; local 94 saltlen = pbe->salt->length; 95 if (!PKCS12_key_gen (pass, passlen, salt, saltlen, PKCS12_KEY_ID, 101 if (!PKCS12_key_gen (pass, passlen, salt, saltlen, PKCS12_IV_ID,
|
pkcs12.h | 183 unsigned char *salt, int saltlen, int iter, 187 int saltlen, int iter, 192 unsigned char *salt, int saltlen, int iter, 219 int saltlen, int id, int iter, int n, 221 int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, int saltlen, int id, int iter, int n, unsigned char *out, const EVP_MD *md_type); 229 unsigned char *salt, int saltlen, int iter, 232 int saltlen, const EVP_MD *md_type);
|
p12_add.c | 105 int passlen, unsigned char *salt, int saltlen, int iter, 125 PKCS8_encrypt(pbe_nid, pbe_ciph, pass, passlen, salt, saltlen, iter, 169 unsigned char *salt, int saltlen, int iter, 188 pbe = PKCS5_pbe2_set(pbe_ciph, iter, salt, saltlen); 190 pbe = PKCS5_pbe_set(pbe_nid, iter, salt, saltlen);
|
/external/openssl/crypto/asn1/ |
p5_pbe.c | 78 const unsigned char *salt, int saltlen) 97 if (!saltlen) 98 saltlen = PKCS5_SALT_LEN; 99 if (!ASN1_STRING_set(pbe->salt, NULL, saltlen)) 106 memcpy(sstr, salt, saltlen); 107 else if (RAND_pseudo_bytes(sstr, saltlen) < 0) 133 const unsigned char *salt, int saltlen) 143 if (PKCS5_pbe_set0_algor(ret, alg, iter, salt, saltlen))
|
p5_pbev2.c | 90 unsigned char *salt, int saltlen, 151 if (!saltlen) saltlen = PKCS5_SALT_LEN; 152 if (!(osalt->data = OPENSSL_malloc (saltlen))) goto merr; 153 osalt->length = saltlen; 154 if (salt) memcpy (osalt->data, salt, saltlen); 155 else if (RAND_pseudo_bytes (osalt->data, saltlen) < 0) goto merr; 232 unsigned char *salt, int saltlen) 234 return PKCS5_pbe2_set_iv(cipher, iter, salt, saltlen, NULL, -1);
|
/frameworks/base/libs/utils/tests/ |
ObbFile_test.cpp | 86 size_t saltLen; 87 const unsigned char* newSalt = mObbFile->getSalt(&saltLen); 89 EXPECT_EQ(sizeof(salt), saltLen)
|