/dalvik/libcore/security/src/main/java/org/bouncycastle/crypto/params/ |
ParametersWithSalt.java | 6 * Cipher parameters with a fixed salt value associated with them. 11 private byte[] salt; field in class:ParametersWithSalt 16 byte[] salt) 18 this(parameters, salt, 0, salt.length); 23 byte[] salt, 27 this.salt = new byte[saltLen]; 30 System.arraycopy(salt, saltOff, this.salt, 0, saltLen); 35 return salt; [all...] |
/dalvik/libcore/crypto/src/main/java/javax/crypto/spec/ |
PBEParameterSpec.java | 34 private final byte[] salt; field in class:PBEParameterSpec 38 * Creates a new <code>PBEParameterSpec</code> with the specified salt and 41 * @param salt 42 * the salt. 46 * if salt is null. 48 public PBEParameterSpec(byte[] salt, int iterationCount) { 49 if (salt == null) { 52 this.salt = new byte[salt.length]; 53 System.arraycopy(salt, 0, this.salt, 0, salt.length) [all...] |
PBEKeySpec.java | 34 private final byte[] salt; field in class:PBEKeySpec 51 salt = null; 57 * Creates a new <code>PBEKeySpec</code> with the specified password, salt, 62 * @param salt 63 * the salt. 69 * if the salt is null. 71 * if the salt is empty, iteration count is zero or negative or 74 public PBEKeySpec(char[] password, byte[] salt, int iterationCount, 76 if (salt == null) { 79 if (salt.length == 0) [all...] |
/dalvik/libcore/security/src/main/java/org/bouncycastle/asn1/pkcs/ |
MacData.java | 19 byte[] salt; field in class:MacData 42 this.salt = ((ASN1OctetString)seq.getObjectAt(1)).getOctets(); 56 byte[] salt, 60 this.salt = salt; 71 return salt; 84 v.add(new DEROctetString(salt));
|
PBKDF2Params.java | 39 byte[] salt, 42 this.octStr = new DEROctetString(salt);
|
PKCS12PBEParams.java | 21 byte[] salt, 24 this.iv = new DEROctetString(salt);
|
/dalvik/libcore/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/ |
PBEParameterSpecTest.java | 45 * PBEParameterSpec(byte[] salt, int iterationCount) method testing. 56 byte[] salt = {1, 2, 3, 4, 5}; 62 + "in the case of null salt."); 66 PBEParameterSpec pbeps = new PBEParameterSpec(salt, iterationCount); 67 salt[0] ++; 68 assertFalse("The change of salt specified in the constructor " 70 salt[0] == pbeps.getSalt()[0]); 74 * getSalt() method testing. Tests that returned salt is equal 75 * to the salt specified in the constructor and that the change of 85 byte[] salt = new byte[] {1, 2, 3, 4, 5} [all...] |
PBEKeySpecTest.java | 73 * PBEKeySpec(char[] password, byte[] salt, int iterationCount, int 86 byte[] salt = new byte[] {1, 2, 3, 4, 5}; 91 PBEKeySpec pbeks = new PBEKeySpec(null, salt, 104 + "in the case of null salt."); 113 + "in the case of empty salt."); 118 new PBEKeySpec(password, salt, -1, keyLength); 125 new PBEKeySpec(password, salt, iterationCount, -1); 132 new PBEKeySpec(password, salt, 0, keyLength); 139 new PBEKeySpec(password, salt, iterationCount, 0); 145 PBEKeySpec pbeks = new PBEKeySpec(password, salt, [all...] |
/dalvik/libcore/security/src/main/java/org/bouncycastle/crypto/generators/ |
OpenSSLPBEParametersGenerator.java | 33 * @param salt salt to use. 37 byte[] salt) 39 super.init(password, salt, 1); 43 * the derived key function, the ith hash of the password and the salt. 55 digest.update(salt, 0, salt.length); 79 * Generate a key parameter derived from the password, salt, and iteration 98 * the password, salt, and iteration count we are currently initialised 120 * salt, and iteration count we are currently initialised with [all...] |
PKCS5S1ParametersGenerator.java | 35 * the derived key function, the ith hash of the password and the salt. 42 digest.update(salt, 0, salt.length); 55 * Generate a key parameter derived from the password, salt, and iteration 80 * the password, salt, and iteration count we are currently initialised 108 * salt, and iteration count we are currently initialised with.
|
PKCS12ParametersGenerator.java | 91 if ((salt != null) && (salt.length != 0)) 93 S = new byte[v * ((salt.length + v - 1) / v)]; 97 S[i] = salt[i % salt.length]; 166 * Generate a key parameter derived from the password, salt, and iteration 184 * the password, salt, and iteration count we are currently initialised 207 * salt, and iteration count we are currently initialised with.
|
/external/dropbear/libtomcrypt/src/pk/pkcs1/ |
pkcs_1_pss_encode.c | 24 @param saltlen The length of the salt desired (octets) 39 unsigned char *DB, *mask, *salt, *hash; local 64 /* allocate ram for DB/mask/salt/hash of size modulus_len */ 67 salt = XMALLOC(modulus_len); 69 if (DB == NULL || mask == NULL || salt == NULL || hash == NULL) { 76 if (salt != NULL) { 77 XFREE(salt); 86 /* generate random salt */ 88 if (prng_descriptor[prng_idx].read(salt, saltlen, prng) != saltlen) { 94 /* M = (eight) 0x00 || msghash || salt, hash = H(M) * [all...] |
pkcs_1_pss_decode.c | 26 @param saltlen The length of the salt used (octets) 37 unsigned char *DB, *mask, *salt, *hash; local 62 /* allocate ram for DB/mask/salt/hash of size modulus_len */ 65 salt = XMALLOC(modulus_len); 67 if (DB == NULL || mask == NULL || salt == NULL || hash == NULL) { 74 if (salt != NULL) { 75 XFREE(salt); 117 /* DB = PS || 0x01 || salt, PS == modulus_len - saltlen - hLen - 2 zero bytes */ 133 /* M = (eight) 0x00 || msghash || salt, mask = H(M) */ 161 zeromem(salt, modulus_len); [all...] |
/external/openssl/crypto/des/ |
fcrypt.c | 27 /* Added more values to handle illegal salt values the way normal 61 char *DES_crypt(const char *buf, const char *salt) 66 return(DES_fcrypt(buf,salt,buff)); 72 /* Copy at most 2 chars of salt */ 73 if ((e_salt[0] = salt[0]) != '\0') 74 e_salt[1] = salt[1]; 99 char *DES_fcrypt(const char *buf, const char *salt, char *ret) 119 x=ret[0]=((salt[0] == '\0')?'A':salt[0]); 121 x=ret[1]=((salt[1] == '\0')?'A':salt[1]) [all...] |
/dalvik/libcore/security/src/main/java/org/bouncycastle/crypto/ |
PBEParametersGenerator.java | 9 protected byte[] salt; field in class:PBEParametersGenerator 23 * @param salt the salt to be mixed with the password. 29 byte[] salt, 33 this.salt = salt; 48 * return the salt byte array. 50 * @return the salt byte array. 54 return salt;
|
/external/openssl/crypto/pkcs12/ |
p12_mutl.c | 72 unsigned char key[EVP_MAX_MD_SIZE], *salt; local 81 salt = p12->mac->salt->data; 82 saltlen = p12->mac->salt->length; 90 if(!PKCS12_key_gen (pass, passlen, salt, saltlen, PKCS12_MAC_ID, iter, 125 unsigned char *salt, int saltlen, int iter, const EVP_MD *md_type) 131 if (PKCS12_setup_mac (p12, iter, salt, saltlen, md_type) == 148 int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, int saltlen, 163 p12->mac->salt->length = saltlen; 164 if (!(p12->mac->salt->data = OPENSSL_malloc (saltlen))) [all...] |
/external/dropbear/libtomcrypt/src/misc/pkcs5/ |
pkcs_5_1.c | 22 @param salt The salt (or nonce) which is 8 octets long 30 const unsigned char *salt, 40 LTC_ARGCHK(salt != NULL); 62 /* hash initial password + salt */ 69 if ((err = hash_descriptor[hash_idx].process(md, salt, 8)) != CRYPT_OK) {
|
pkcs_5_2.c | 23 @param salt The salt (or nonce) 24 @param salt_len The length of the salt (octets) 32 const unsigned char *salt, unsigned long salt_len, 43 LTC_ARGCHK(salt != NULL); 81 if ((err = hmac_process(hmac, salt, salt_len)) != CRYPT_OK) {
|
/dalvik/libcore/security/src/main/java/org/bouncycastle/jce/provider/ |
JDKKeyStore.java | 136 byte[] salt = new byte[KEY_SALT_SIZE]; 139 random.nextBytes(salt); 147 dOut.writeInt(salt.length); 148 dOut.write(salt); 151 Cipher cipher = makePBECipher(KEY_CIPHER, Cipher.ENCRYPT_MODE, password, salt, iterationCount); 223 byte[] salt = new byte[dIn.readInt()]; 225 dIn.readFully(salt); 229 Cipher cipher = makePBECipher(KEY_CIPHER, Cipher.DECRYPT_MODE, password, salt, iterationCount); 242 salt = new byte[dIn.readInt()]; 244 dIn.readFully(salt); [all...] |
/dalvik/libcore/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/ |
CipherPBEThread.java | 39 byte[] salt = new byte[8]; 49 sr.nextBytes(salt); 50 PBEParameterSpec parSpec = new PBEParameterSpec(salt, getKeyLength());
|
/dalvik/libcore/crypto/src/main/java/javax/crypto/interfaces/ |
PBEKey.java | 40 * Returns a copy of the salt data or null if not specified. 42 * @return a copy of the salt data or null if not specified.
|
/dalvik/libcore/security/src/main/java/java/security/spec/ |
PSSParameterSpec.java | 37 * <li>salt length: {@code 20}</li> 51 // Salt length in bits 55 * Creates a new {@code PSSParameterSpec} with the specified salt length 59 * the salt length (in bits). 77 * salt length, and trailer field value. 86 * the salt length (in bits). 115 * Returns the length of the salt (in bits). 117 * @return the length of the salt (in bits).
|
/external/openssl/crypto/asn1/ |
p5_pbe.c | 68 ASN1_SIMPLE(PBEPARAM, salt, ASN1_OCTET_STRING), 76 X509_ALGOR *PKCS5_pbe_set(int alg, int iter, unsigned char *salt, 94 if (!(pbe->salt->data = OPENSSL_malloc (saltlen))) { 98 pbe->salt->length = saltlen; 99 if (salt) memcpy (pbe->salt->data, salt, saltlen); 100 else if (RAND_pseudo_bytes (pbe->salt->data, saltlen) < 0)
|
/external/openssl/crypto/rsa/ |
rsa_pss.c | 88 * -2 salt length is autorecovered from signature 176 unsigned char *H, *salt = NULL, *p; local 183 * -2 salt length is maximized 213 salt = OPENSSL_malloc(sLen); 214 if (!salt) 220 if (RAND_bytes(salt, sLen) <= 0) 230 EVP_DigestUpdate(&ctx, salt, sLen); 248 *p++ ^= salt[i]; 260 if (salt) 261 OPENSSL_free(salt); [all...] |
/external/openssl/crypto/evp/ |
p5_crpt2.c | 80 const unsigned char *salt, int saltlen, int iter, 104 HMAC_Update(&hctx, salt, saltlen); 121 fprintf(stderr, "Salt:\n"); 122 h__dump (salt, saltlen); 134 unsigned char salt[] = {0x12, 0x34, 0x56, 0x78}; local 135 PKCS5_PBKDF2_HMAC_SHA1("password", -1, salt, 4, 5, 4, out); 151 unsigned char *salt, key[EVP_MAX_KEY_LENGTH]; local 234 if(kdf->salt->type != V_ASN1_OCTET_STRING) { 241 salt = kdf->salt->value.octet_string->data [all...] |