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

1 2 3 4 5 6 7 8 91011>>

  /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/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));
PBKDF2Params.java 39 byte[] salt,
42 this.octStr = new DEROctetString(salt);
47 byte[] salt,
51 this(salt, iterationCount);
  /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/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...]
  /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...]
  /frameworks/base/tools/obbtool/
pbkdf2gen.cpp 29 * Will print out the salt and key in hex.
50 unsigned char salt[SALT_LEN]; local
52 if (read(fd, &salt, SALT_LEN) != SALT_LEN) {
53 fprintf(stderr, "Could not read salt from /dev/urandom: %s\n", strerror(errno));
61 if (PKCS5_PBKDF2_HMAC_SHA1(argv[1], strlen(argv[1]), salt, SALT_LEN,
67 printf("salt=");
69 printf("%02x", salt[i]);
  /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);
  /libcore/luni/src/test/java/libcore/javax/crypto/
SecretKeyFactoryTest.java 36 private static final byte[] SALT = {0, 1, 2, 3, 4, 5, 6, 7};
74 KeySpec ks = new PBEKeySpec(null, SALT, ITERATIONS);
80 KeySpec ks = new PBEKeySpec(new char[0], SALT, ITERATIONS);
86 KeySpec ks = new PBEKeySpec(PASSWORD, SALT, ITERATIONS);
93 KeySpec ks = new PBEKeySpec(null, SALT, ITERATIONS, KEY_LENGTH);
100 KeySpec ks = new PBEKeySpec(new char[0], SALT, ITERATIONS, KEY_LENGTH);
106 KeySpec ks = new PBEKeySpec(PASSWORD, SALT, ITERATIONS, KEY_LENGTH);
117 test_PBKDF2_UTF8(PASSWORD, SALT, ITERATIONS, KEY_LENGTH, expected);
118 test_PBKDF2_8BIT(PASSWORD, SALT, ITERATIONS, KEY_LENGTH, expected);
128 byte[] salt = new byte[]
    [all...]
  /external/openssh/
auth2-jpake.c 63 * anyway because they will mismatch on fake salt.
120 /* Returns 1 if 'c' is a valid crypt(3) salt character, 0 otherwise */
134 * Derive fake salt as H(username || first_private_host_key)
185 /* ASCII an integer [0, 64) for inclusion in a password/salt */
194 /* Generate ASCII salt bytes for user */
216 * a stable fake salt under it for use by a non-existent account.
220 fake_salt_and_scheme(Authctxt *authctxt, char **salt, char **scheme)
240 xasprintf(salt, "$1$%s$", makesalt(8, authctxt->user));
243 *salt = xstrdup(makesalt(2, authctxt->user));
248 xasprintf(salt, "_%c%c%c%c%s"
377 char *salt, *hash_scheme; local
    [all...]
  /external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/generators/
OpenSSLPBEParametersGenerator.java 37 * @param salt salt to use.
41 byte[] salt)
43 super.init(password, salt, 1);
47 * the derived key function, the ith hash of the password and the salt.
59 digest.update(salt, 0, salt.length);
83 * Generate a key parameter derived from the password, salt, and iteration
102 * the password, salt, and iteration count we are currently initialised
124 * salt, and iteration count we are currently initialised with
    [all...]
  /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/third_party/openssl/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...]
  /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...]
  /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...]
  /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/chrome/browser/renderer_host/pepper/
device_id_fetcher.cc 85 // TODO(raymes): Change this to just return the device id salt and call it with
105 // Check if the salt pref is set. If it isn't, set it.
106 std::string salt = profile->GetPrefs()->GetString(prefs::kDRMSalt); local
107 if (salt.empty()) {
111 salt = base::HexEncode(salt_bytes, arraysize(salt_bytes));
112 profile->GetPrefs()->SetString(prefs::kDRMSalt, salt);
116 // Try the legacy path first for ChromeOS. We pass the new salt in as well
120 profile->GetPath(), salt));
124 base::Bind(&DeviceIDFetcher::ComputeOnIOThread, this, salt));
129 void DeviceIDFetcher::ComputeOnIOThread(const std::string& salt) {
    [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) {

Completed in 1762 milliseconds

1 2 3 4 5 6 7 8 91011>>