HomeSort by relevance Sort by last modified time
    Searched full:salt (Results 1 - 25 of 262) 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/toybox/toys/other/
mkpasswd.c 1 /* mkpasswd.c - encrypt the given passwd using salt
14 usage: mkpasswd [-P FD] [-m TYPE] [-S SALT] [PASSWORD] [SALT]
20 -S SALT
29 char *salt;
34 char salt[MAX_SALT_LEN] = {0,}; local
39 if (TT.salt) error_exit("duplicate salt");
40 TT.salt = toys.optargs[1];
43 if (-1 == (i = get_salt(salt, TT.method))) error_exit("bad -m")
    [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);
PBKDF2Params.java 20 * salt CHOICE {
62 * Create a PBKDF2Params with the specified salt, iteration count, and algid-hmacWithSHA1 for the prf.
64 * @param salt input salt.
68 byte[] salt,
71 this.octStr = new DEROctetString(salt);
76 * Create a PBKDF2Params with the specified salt, iteration count, keyLength, and algid-hmacWithSHA1 for the prf.
78 * @param salt input salt.
83 byte[] salt,
    [all...]
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));
  /system/extras/verity/
build_verity_tree.cpp 21 const unsigned char *salt; member in struct:sparse_hash_ctx
53 const unsigned char *salt, size_t salt_len,
63 ret &= EVP_DigestUpdate(mdctx, salt, salt_len);
77 const unsigned char *salt, size_t salt_size,
83 hash_block(md, in + i, block_size, salt, salt_size, out, &s);
99 ctx->salt, ctx->salt_size, ctx->block_size);
114 " -a,--salt-str=<string> set salt to <string>\n"
115 " -A,--salt-hex=<hex digits> set salt to <hex digits>\n
127 unsigned char *salt = NULL; local
    [all...]
build_verity_metadata.py 40 def build_verity_table(block_device, data_blocks, root_hash, salt):
49 salt)
53 salt, block_device, signer_path, signing_key):
55 verity_table = build_verity_table(block_device, data_blocks, root_hash, salt)
71 salt = sys.argv[4] variable
76 salt, block_device, signer_path, signing_key)
  /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...]
  /external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/spec/
PBKDF2KeySpec.java 19 * @param salt salt to use in the generator,
24 public PBKDF2KeySpec(char[] password, byte[] salt, int iterationCount, int keySize, AlgorithmIdentifier prf)
26 super(password, salt, iterationCount, keySize);
  /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 68 unsigned char salt[SALT_SIZE] = {0x01, 0x10, 0x55, 0xAA, 0xFF, 0x00, 0x5A, 0xA5}; local
69 EXPECT_TRUE(mObbFile->setSalt(salt, SALT_SIZE))
70 << "Salt should be successfully set";
89 EXPECT_EQ(sizeof(salt), saltLen)
90 << "salt sizes were not the same";
92 for (size_t i = 0; i < sizeof(salt); i++) {
93 EXPECT_EQ(salt[i], newSalt[i])
94 << "salt character " << i << " should be equal";
96 EXPECT_TRUE(memcmp(newSalt, salt, sizeof(salt)) == 0
    [all...]
  /frameworks/base/tools/obbtool/
pbkdf2gen.cpp 30 * Will print out the salt and key in hex.
51 unsigned char salt[SALT_LEN]; local
53 if (read(fd, &salt, SALT_LEN) != SALT_LEN) {
54 fprintf(stderr, "Could not read salt from /dev/urandom: %s\n", strerror(errno));
62 if (PKCS5_PBKDF2_HMAC_SHA1(argv[1], strlen(argv[1]), salt, SALT_LEN,
68 printf("salt=");
70 printf("%02x", salt[i]);
  /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...]
  /prebuilts/python/linux-x86/2.7.5/lib/python2.7/lib-dynload/
crypt.so 
  /system/core/gatekeeperd/
SoftGateKeeper.h 36 uint64_t salt; member in struct:gatekeeper::fast_hash_t
81 uint32_t password_length, salt_t salt) const {
83 crypto_scrypt(password, password_length, reinterpret_cast<uint8_t *>(&salt),
84 sizeof(salt), N, r, p, signature, signature_length);
134 fast_hash_t ComputeFastHash(const SizedBuffer &password, uint64_t salt) {
136 size_t digest_size = password.length + sizeof(salt);
138 memcpy(digest.get(), &salt, sizeof(salt));
139 memcpy(digest.get() + sizeof(salt), password.buffer.get(), password.length);
143 fast_hash.salt = salt
158 uint64_t salt; 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...]
  /system/keymaster/
hkdf.h 33 // |salt|: an (optional) public salt / non-secret random value. While
34 // optional, callers are strongly recommended to provide a salt. There is no
41 Rfc5869HmacSha256Kdf(Buffer& secret, Buffer& salt, Buffer& info, size_t key_bytes_to_generate,
44 Rfc5869HmacSha256Kdf(const uint8_t* secret, size_t secret_len, const uint8_t* salt,
hkdf.cpp 31 Rfc5869HmacSha256Kdf::Rfc5869HmacSha256Kdf(Buffer& secret, Buffer& salt, Buffer& info,
33 Rfc5869HmacSha256Kdf(secret.peek_read(), secret.available_read(), salt.peek_read(),
34 salt.available_read(), info.peek_read(), info.available_read(),
39 const uint8_t* salt, size_t salt_len,
46 if (salt) {
47 result = prk_hmac.Init(salt, salt_len);
50 // If salt is not given, HashLength zeros are used.
  /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;
  /frameworks/base/core/jni/
android_content_res_ObbScanner.cpp 38 jfieldID salt; member in struct:android::__anon22495
68 const unsigned char* salt = obb->getSalt(&saltLen); local
71 env->SetByteArrayRegion(saltArray, 0, saltLen, (jbyte*)salt);
72 env->SetObjectField(obbInfo, gObbInfoClassInfo.salt, saltArray);
93 gObbInfoClassInfo.salt = GetFieldIDOrDie(env, clazz, "salt", "[B");
  /external/openssh/openbsd-compat/
xcrypt.c 66 xcrypt(const char *password, const char *salt)
71 if (is_md5_salt(salt))
72 crypted = md5_crypt(password, salt);
74 crypted = crypt(password, salt);
77 crypted = bigcrypt(password, salt);
79 crypted = crypt(password, salt);
81 crypted = bigcrypt(password, salt);
83 crypted = crypt(password, salt);
  /external/chromium-trace/trace-viewer/third_party/webapp2/webapp2_extras/
security.py 105 to set the method to plain to enforce plaintext passwords. If a salt
106 is used, hmac is used internally to salt the password.
113 Length of the salt to be created.
119 method$salt$hash
123 salt = method != 'plain' and generate_random_string(length) or ''
124 hashval = hash_password(password, method, salt, pepper)
128 return '%s$%s$%s' % (hashval, method, salt)
151 hashval, method, salt = pwhash.split('$', 2)
152 return hash_password(password, method, salt, pepper) == hashval
155 def hash_password(password, method, salt=None, pepper=None)
    [all...]

Completed in 243 milliseconds

1 2 3 4 5 6 7 8 91011