HomeSort by relevance Sort by last modified time
    Searched refs:salt (Results 1 - 25 of 210) sorted by null

1 2 3 4 5 6 7 8 9

  /libcore/luni/src/main/java/javax/crypto/spec/
PBEParameterSpec.java 32 private final byte[] salt; field in class:PBEParameterSpec
36 * Creates a new <code>PBEParameterSpec</code> with the specified salt and
39 * @param salt
40 * the salt.
44 * if salt is null.
46 public PBEParameterSpec(byte[] salt, int iterationCount) {
47 if (salt == null) {
48 throw new NullPointerException("salt == null");
50 this.salt = new byte[salt.length]
    [all...]
PBEKeySpec.java 33 private final byte[] salt; field in class:PBEKeySpec
50 salt = null;
56 * Creates a new <code>PBEKeySpec</code> with the specified password, salt,
61 * @param salt
62 * the salt.
68 * if the salt is null.
70 * if the salt is empty, iteration count is zero or negative or
73 public PBEKeySpec(char[] password, byte[] salt, int iterationCount,
75 if (salt == null) {
76 throw new NullPointerException("salt == null")
    [all...]
  /external/smack/src/org/xbill/DNS/
NSEC3PARAMRecord.java 12 * algorithm, salt, iterations) used for a valid, complete NSEC3 chain present
28 private byte salt[]; field in class:NSEC3PARAMRecord
45 * @param salt The salt to use (may be null).
48 int flags, int iterations, byte [] salt)
55 if (salt != null) {
56 if (salt.length > 255)
57 throw new IllegalArgumentException("Invalid salt " +
59 if (salt.length > 0) {
60 this.salt = new byte[salt.length]
    [all...]
NSEC3Record.java 51 private byte [] salt; field in class:NSEC3Record
73 * @param salt The salt to use (may be null).
78 int flags, int iterations, byte [] salt, byte [] next,
86 if (salt != null) {
87 if (salt.length > 255)
88 throw new IllegalArgumentException("Invalid salt");
89 if (salt.length > 0) {
90 this.salt = new byte[salt.length]
    [all...]
  /external/chromium_org/chrome/android/java/src/org/chromium/chrome/browser/identity/
UniqueIdentificationGenerator.java 19 * @param salt the salt to use for the unique ID.
22 String getUniqueId(@Nullable String salt);
  /external/apache-harmony/crypto/src/test/api/java/org/apache/harmony/crypto/tests/javax/crypto/spec/
PBEParameterSpecTest.java 38 * PBEParameterSpec(byte[] salt, int iterationCount) method testing.
43 byte[] salt = {1, 2, 3, 4, 5};
49 + "in the case of null salt.");
53 PBEParameterSpec pbeps = new PBEParameterSpec(salt, iterationCount);
54 salt[0] ++;
55 assertFalse("The change of salt specified in the constructor "
57 salt[0] == pbeps.getSalt()[0]);
61 * getSalt() method testing. Tests that returned salt is equal
62 * to the salt specified in the constructor and that the change of
66 byte[] salt = new byte[] {1, 2, 3, 4, 5}
    [all...]
PBEKeySpecTest.java 60 * PBEKeySpec(char[] password, byte[] salt, int iterationCount, int
67 byte[] salt = new byte[] {1, 2, 3, 4, 5};
72 PBEKeySpec pbeks = new PBEKeySpec(null, salt,
85 + "in the case of null salt.");
94 + "in the case of empty salt.");
99 new PBEKeySpec(password, salt, -1, keyLength);
106 new PBEKeySpec(password, salt, iterationCount, -1);
113 new PBEKeySpec(password, salt, 0, keyLength);
120 new PBEKeySpec(password, salt, iterationCount, 0);
126 PBEKeySpec pbeks = new PBEKeySpec(password, salt,
    [all...]
  /libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/
PBEParameterSpecTest.java 38 * PBEParameterSpec(byte[] salt, int iterationCount) method testing.
43 byte[] salt = {1, 2, 3, 4, 5};
49 + "in the case of null salt.");
53 PBEParameterSpec pbeps = new PBEParameterSpec(salt, iterationCount);
54 salt[0] ++;
55 assertFalse("The change of salt specified in the constructor "
57 salt[0] == pbeps.getSalt()[0]);
61 * getSalt() method testing. Tests that returned salt is equal
62 * to the salt specified in the constructor and that the change of
66 byte[] salt = new byte[] {1, 2, 3, 4, 5}
    [all...]
PBEKeySpecTest.java 60 * PBEKeySpec(char[] password, byte[] salt, int iterationCount, int
67 byte[] salt = new byte[] {1, 2, 3, 4, 5};
72 PBEKeySpec pbeks = new PBEKeySpec(null, salt,
85 + "in the case of null salt.");
94 + "in the case of empty salt.");
99 new PBEKeySpec(password, salt, -1, keyLength);
106 new PBEKeySpec(password, salt, iterationCount, -1);
113 new PBEKeySpec(password, salt, 0, keyLength);
120 new PBEKeySpec(password, salt, iterationCount, 0);
126 PBEKeySpec pbeks = new PBEKeySpec(password, salt,
    [all...]
  /external/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/pkcs/
PBEParameter.java 18 ASN1OctetString salt; field in class:PBEParameter
21 byte[] salt,
24 if (salt.length != 8)
26 throw new IllegalArgumentException("salt length must be 8");
28 this.salt = new DEROctetString(salt);
35 salt = (ASN1OctetString)seq.getObjectAt(0);
61 return salt.getOctets();
68 v.add(salt);
MacData.java 21 byte[] salt; field in class:MacData
44 this.salt = ((ASN1OctetString)seq.getObjectAt(1)).getOctets();
58 byte[] salt,
62 this.salt = salt;
73 return salt;
97 v.add(new DEROctetString(salt));
  /external/openssh/openbsd-compat/
xcrypt.c 61 xcrypt(const char *password, const char *salt)
66 if (is_md5_salt(salt))
67 crypted = md5_crypt(password, salt);
69 crypted = crypt(password, salt);
72 crypted = bigcrypt(password, salt);
74 crypted = crypt(password, salt);
76 crypted = bigcrypt(password, salt);
78 crypted = crypt(password, salt);
port-uw.c 56 char *salt; local
66 /* Encrypt the candidate password using the proper salt. */
67 salt = (pw_password[0] && pw_password[1]) ? pw_password : "xx";
75 result = ((strcmp(bigcrypt(password, salt), pw_password) == 0)
76 || (strcmp(osr5bigcrypt(password, salt), pw_password) == 0));
80 result = (strcmp(xcrypt(password, salt), pw_password) == 0);
  /external/chromium_org/third_party/tlslite/tlslite/
VerifierDB.py 29 (N, g, salt, verifier) = valueStr.split(" ")
32 salt = base64ToString(salt)
34 return (N, g, salt, verifier)
55 N, g, salt, verifier = value
58 salt = stringToBase64(salt)
60 valueStr = " ".join( (N, g, salt, verifier) )
64 (N, g, salt, verifier) = value
65 x = mathtls.makeX(salt, username, param
    [all...]
  /external/chromium_org/chrome/android/javatests/src/org/chromium/chrome/browser/identity/
SettingsSecureBasedIdentificationGeneratorTest.java 22 String salt = "mySalt"; local
23 String expected = HashUtil.getMd5Hash(new HashUtil.Params(androidId).withSalt(salt));
24 runTest(androidId, salt, expected);
39 String salt = "mySalt"; local
41 runTest(androidId, salt, expected);
48 String salt = null; local
50 runTest(androidId, salt, expected);
53 private void runTest(String androidId, String salt, String expectedUniqueId) {
58 String result = generator.getUniqueId(salt);
  /external/chromium_org/third_party/openssl/openssl/crypto/asn1/
p5_pbe.c 68 ASN1_SIMPLE(PBEPARAM, salt, ASN1_OCTET_STRING),
78 const unsigned char *salt, int saltlen)
99 if (!ASN1_STRING_set(pbe->salt, NULL, saltlen))
104 sstr = ASN1_STRING_data(pbe->salt);
105 if (salt)
106 memcpy(sstr, salt, saltlen);
133 const unsigned char *salt, int saltlen)
143 if (PKCS5_pbe_set0_algor(ret, alg, iter, salt, saltlen))
  /external/openssl/crypto/asn1/
p5_pbe.c 68 ASN1_SIMPLE(PBEPARAM, salt, ASN1_OCTET_STRING),
78 const unsigned char *salt, int saltlen)
99 if (!ASN1_STRING_set(pbe->salt, NULL, saltlen))
104 sstr = ASN1_STRING_data(pbe->salt);
105 if (salt)
106 memcpy(sstr, salt, saltlen);
133 const unsigned char *salt, int saltlen)
143 if (PKCS5_pbe_set0_algor(ret, alg, iter, salt, saltlen))
  /external/chromium_org/third_party/openssl/openssl/crypto/pkcs12/
p12_crpt.c 74 unsigned char *salt; local
93 salt = pbe->salt->data;
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,
p12_mutl.c 72 unsigned char key[EVP_MAX_MD_SIZE], *salt; local
82 salt = p12->mac->salt->data;
83 saltlen = p12->mac->salt->length;
94 if(!PKCS12_key_gen (pass, passlen, salt, saltlen, PKCS12_MAC_ID, iter,
133 unsigned char *salt, int saltlen, int iter, const EVP_MD *md_type)
139 if (PKCS12_setup_mac (p12, iter, salt, saltlen, md_type) ==
156 int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, int saltlen,
171 p12->mac->salt->length = saltlen;
172 if (!(p12->mac->salt->data = OPENSSL_malloc (saltlen)))
    [all...]
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);
  /external/openssl/crypto/pkcs12/
p12_crpt.c 74 unsigned char *salt; local
93 salt = pbe->salt->data;
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,
p12_mutl.c 72 unsigned char key[EVP_MAX_MD_SIZE], *salt; local
82 salt = p12->mac->salt->data;
83 saltlen = p12->mac->salt->length;
94 if(!PKCS12_key_gen (pass, passlen, salt, saltlen, PKCS12_MAC_ID, iter,
133 unsigned char *salt, int saltlen, int iter, const EVP_MD *md_type)
139 if (PKCS12_setup_mac (p12, iter, salt, saltlen, md_type) ==
156 int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, int saltlen,
171 p12->mac->salt->length = saltlen;
172 if (!(p12->mac->salt->data = OPENSSL_malloc (saltlen)))
    [all...]
  /frameworks/base/libs/androidfw/tests/
ObbFile_test.cpp 70 unsigned char salt[SALT_SIZE] = {0x01, 0x10, 0x55, 0xAA, 0xFF, 0x00, 0x5A, 0xA5}; local
71 EXPECT_TRUE(mObbFile->setSalt(salt, SALT_SIZE))
72 << "Salt should be successfully set";
91 EXPECT_EQ(sizeof(salt), saltLen)
92 << "salt sizes were not the same";
94 for (int i = 0; i < sizeof(salt); i++) {
95 EXPECT_EQ(salt[i], newSalt[i])
96 << "salt character " << i << " should be equal";
98 EXPECT_TRUE(memcmp(newSalt, salt, sizeof(salt)) == 0
    [all...]
  /external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/
PBEParametersGenerator.java 11 protected byte[] salt; field in class:PBEParametersGenerator
25 * @param salt the salt to be mixed with the password.
31 byte[] salt,
35 this.salt = salt;
50 * return the salt byte array.
52 * @return the salt byte array.
56 return salt;
  /external/chromium_org/crypto/
hkdf_unittest.cc 65 std::string salt(test.salt_hex);
66 if (!salt.empty()) {
67 ASSERT_TRUE(base::HexStringToBytes(salt, &data));
68 salt.assign(reinterpret_cast<char*>(&data[0]), data.size());
85 HKDF hkdf(key, salt, info, expected.size(), 0);

Completed in 272 milliseconds

1 2 3 4 5 6 7 8 9