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

1 2 3 4 5 6 7 8 91011>>

  /external/syslinux/com32/cmenu/libmenu/
des.h 6 extern char *crypt(const char *key, const char *salt);
  /external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/
PKCS12KeyWithParameters.java 14 private final byte[] salt; field in class:PKCS12KeyWithParameters
21 * @param salt salt for generation algorithm
24 public PKCS12KeyWithParameters(char[] password, byte[] salt, int iterationCount)
28 this.salt = Arrays.clone(salt);
38 * @param salt salt for generation algorithm
42 public PKCS12KeyWithParameters(char[] password, boolean useWrongZeroLengthConversion, byte[] salt, int iterationCount)
46 this.salt = Arrays.clone(salt)
    [all...]
  /libcore/ojluni/src/main/java/javax/crypto/spec/
PBEParameterSpec.java 42 private byte[] salt; field in class:PBEParameterSpec
50 * @param salt the salt. The contents of <code>salt</code> are copied
53 * @exception NullPointerException if <code>salt</code> is null.
55 public PBEParameterSpec(byte[] salt, int iterationCount) {
56 this.salt = salt.clone();
64 * @param salt the salt. The contents of <code>salt</code> are copie
    [all...]
PBEKeySpec.java 66 private byte[] salt = null; field in class:PBEKeySpec
89 * Constructor that takes a password, salt, iteration count, and
94 * <p> Note: the <code>password</code> and <code>salt</code>
99 * @param salt the salt.
102 * @exception NullPointerException if <code>salt</code> is null.
103 * @exception IllegalArgumentException if <code>salt</code> is empty,
107 public PBEKeySpec(char[] password, byte[] salt, int iterationCount,
114 if (salt == null) {
115 throw new NullPointerException("the salt parameter "
    [all...]
  /external/python/cpython3/Modules/clinic/
_cryptmodule.c.h 6 "crypt($module, word, salt, /)\n"
9 "Hash a *word* with the given *salt* and return the hashed password.\n"
11 "*word* will usually be a user\'s password. *salt* (either a random 2 or 16\n"
20 crypt_crypt_impl(PyObject *module, const char *word, const char *salt);
27 const char *salt; local
30 &word, &salt)) {
33 return_value = crypt_crypt_impl(module, word, salt);
_hashopenssl.c.h 8 "scrypt($module, /, password, *, salt=None, n=None, r=None, p=None,\n"
18 _hashlib_scrypt_impl(PyObject *module, Py_buffer *password, Py_buffer *salt,
26 static const char * const _keywords[] = {"password", "salt", "n", "r", "p", "maxmem", "dklen", NULL};
29 Py_buffer salt = {NULL, NULL}; local
37 &password, &salt, &PyLong_Type, &n_obj, &PyLong_Type, &r_obj, &PyLong_Type, &p_obj, &maxmem, &dklen)) {
40 return_value = _hashlib_scrypt_impl(module, &password, &salt, n_obj, r_obj, p_obj, maxmem, dklen);
47 /* Cleanup for salt */
48 if (salt.obj) {
49 PyBuffer_Release(&salt);
  /frameworks/base/core/java/android/security/
Scrypt.java 26 native byte[] nativeScrypt(byte[] password, byte[] salt, int n, int r, int p, int outLen);
29 public byte[] scrypt(byte[] password, byte[] salt, int n, int r, int p, int outLen) {
30 return nativeScrypt(password, salt, n, r, p, outLen);
  /libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/
PBEParameterSpecTest.java 39 * PBEParameterSpec(byte[] salt, int iterationCount) method testing.
44 byte[] salt = {1, 2, 3, 4, 5};
50 + "in the case of null salt.");
54 PBEParameterSpec pbeps = new PBEParameterSpec(salt, iterationCount);
55 salt[0] ++;
56 assertFalse("The change of salt specified in the constructor "
58 salt[0] == pbeps.getSalt()[0]);
62 * getSalt() method testing. Tests that returned salt is equal
63 * to the salt specified in the constructor and that the change of
67 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/syslinux/utils/
md5pass 27 ($pass, $salt) = @ARGV;
29 unless (defined($salt)) {
30 $salt = MIME::Base64::encode(random_bytes(6), '');
31 $salt =~ tr/\+/./; # . not +
34 print unix_md5_crypt($pass, $salt), "\n";
sha1pass 27 ($pass, $salt) = @ARGV;
29 unless (defined($salt)) {
30 $salt = MIME::Base64::encode(random_bytes(6), '');
32 $pass = Digest::SHA1::sha1_base64($salt, $pass);
34 print '$4$', $salt, '$', $pass, "\$\n";
  /system/keymaster/include/keymaster/km_openssl/
hkdf.h 35 bool Init(Buffer& secret, Buffer& salt) {
36 return Init(secret.peek_read(), secret.available_read(), salt.peek_read(),
37 salt.available_read());
40 bool Init(const uint8_t* secret, size_t secret_len, const uint8_t* salt, size_t salt_len) {
41 return Kdf::Init(KM_DIGEST_SHA_2_256, secret, secret_len, salt, salt_len);
  /external/toybox/toys/other/
mkpasswd.c 1 /* mkpasswd.c - encrypt the given passwd using salt
15 usage: mkpasswd [-P FD] [-m TYPE] [-S SALT] [PASSWORD] [SALT]
21 -S SALT
30 char *salt;
35 char salt[MAX_SALT_LEN] = {0,}; local
40 if (TT.salt) error_exit("duplicate salt");
41 TT.salt = toys.optargs[1];
44 if (-1 == (i = get_salt(salt, TT.method))) error_exit("bad -m")
    [all...]
  /system/keymaster/tests/
kdf_test.cpp 34 uint8_t salt[128]; local
35 ASSERT_TRUE(kdf.Init(KM_DIGEST_SHA1, key, 128, salt, 128));
36 ASSERT_TRUE(kdf.Init(KM_DIGEST_SHA_2_256, key, 128, salt, 128));
38 ASSERT_FALSE(kdf.Init(KM_DIGEST_MD5, key, 128, salt, 128));
39 ASSERT_FALSE(kdf.Init(KM_DIGEST_SHA1, nullptr, 0, salt, 128));
40 ASSERT_FALSE(kdf.Init(KM_DIGEST_SHA1, nullptr, 128, salt, 128));
41 ASSERT_FALSE(kdf.Init(KM_DIGEST_SHA1, key, 0, salt, 128));
  /device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Modules/
cryptmodule.c 17 char *word, *salt; local
22 if (!PyArg_ParseTuple(args, "ss:crypt", &word, &salt)) {
26 salt. Return None in that case. XXX Maybe raise an exception? */
27 return Py_BuildValue("s", crypt(word, salt));
32 "crypt(word, salt) -> string\n\
33 word will usually be a user's password. salt is a 2-character string\n\
35 in salt must be either \".\", \"/\", or an alphanumeric character. Returns\n\
37 the same alphabet as the salt.");
  /external/python/cpython2/Modules/
cryptmodule.c 17 char *word, *salt; local
22 if (!PyArg_ParseTuple(args, "ss:crypt", &word, &salt)) {
26 salt. Return None in that case. XXX Maybe raise an exception? */
27 return Py_BuildValue("s", crypt(word, salt));
32 "crypt(word, salt) -> string\n\
33 word will usually be a user's password. salt is a 2-character string\n\
35 in salt must be either \".\", \"/\", or an alphanumeric character. Returns\n\
37 the same alphabet as the salt.");
  /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 22 byte[] salt; field in class:MacData
45 this.salt = Arrays.clone(((ASN1OctetString)seq.getObjectAt(1)).getOctets());
59 byte[] salt,
63 this.salt = Arrays.clone(salt);
74 return Arrays.clone(salt);
98 v.add(new DEROctetString(salt));
  /external/python/cpython3/Modules/
_cryptmodule.c 21 salt: str
24 Hash a *word* with the given *salt* and return the hashed password.
26 *word* will usually be a user's password. *salt* (either a random 2 or 16
34 crypt_crypt_impl(PyObject *module, const char *word, const char *salt)
38 salt. Return None in that case. XXX Maybe raise an exception? */
39 return Py_BuildValue("s", crypt(word, salt));
  /device/generic/goldfish/gatekeeper/
SoftGateKeeper.h 38 uint64_t salt; member in struct:gatekeeper::fast_hash_t
83 uint32_t password_length, salt_t salt) const {
85 crypto_scrypt(password, password_length, reinterpret_cast<uint8_t *>(&salt),
86 sizeof(salt), N, r, p, signature, signature_length);
136 fast_hash_t ComputeFastHash(const SizedBuffer &password, uint64_t salt) {
138 size_t digest_size = password.length + sizeof(salt);
140 memcpy(digest.get(), &salt, sizeof(salt));
141 memcpy(digest.get() + sizeof(salt), password.buffer.get(), password.length);
145 fast_hash.salt = salt
161 uint64_t salt; local
    [all...]
  /device/google/cuttlefish_common/guest/hals/gatekeeper/
SoftGateKeeper.h 38 uint64_t salt; member in struct:gatekeeper::fast_hash_t
83 uint32_t password_length, salt_t salt) const {
85 crypto_scrypt(password, password_length, reinterpret_cast<uint8_t *>(&salt),
86 sizeof(salt), N, r, p, signature, signature_length);
136 fast_hash_t ComputeFastHash(const SizedBuffer &password, uint64_t salt) {
138 size_t digest_size = password.length + sizeof(salt);
140 memcpy(digest.get(), &salt, sizeof(salt));
141 memcpy(digest.get() + sizeof(salt), password.buffer.get(), password.length);
145 fast_hash.salt = salt
161 uint64_t salt; local
    [all...]
  /system/core/gatekeeperd/
SoftGateKeeper.h 38 uint64_t salt; member in struct:gatekeeper::fast_hash_t
83 uint32_t password_length, salt_t salt) const {
85 crypto_scrypt(password, password_length, reinterpret_cast<uint8_t *>(&salt),
86 sizeof(salt), N, r, p, signature, signature_length);
136 fast_hash_t ComputeFastHash(const SizedBuffer &password, uint64_t salt) {
138 size_t digest_size = password.length + sizeof(salt);
140 memcpy(digest.get(), &salt, sizeof(salt));
141 memcpy(digest.get() + sizeof(salt), password.buffer.get(), password.length);
145 fast_hash.salt = salt
161 uint64_t salt; local
    [all...]
  /frameworks/base/core/java/android/security/keystore/recovery/
KeyDerivationParams.java 78 * salt + key_material_len + key_material, where salt_len and key_material_len are 4-byte, and
79 * denote the number of bytes for salt and key_material, respectively.
81 public static @NonNull KeyDerivationParams createSha256Params(@NonNull byte[] salt) {
82 return new KeyDerivationParams(ALGORITHM_SHA256, salt);
95 @NonNull byte[] salt, int memoryDifficulty) {
96 return new KeyDerivationParams(ALGORITHM_SCRYPT, salt, memoryDifficulty);
102 private KeyDerivationParams(@KeyDerivationAlgorithm int algorithm, @NonNull byte[] salt) {
103 this(algorithm, salt, /*memoryDifficulty=*/ -1);
109 private KeyDerivationParams(@KeyDerivationAlgorithm int algorithm, @NonNull byte[] salt,
112 mSalt = Preconditions.checkNotNull(salt);
    [all...]
  /external/python/cpython3/Lib/
crypt.py 15 """Class representing a salt method per the Modular Crypt Format or the
23 """Generate a salt for the specified method.
35 def crypt(word, salt=None):
36 """Return a string representing the one-way hash of a password, with a salt
39 If ``salt`` is not specified or is ``None``, the strongest
40 available method will be selected and a salt generated. Otherwise,
41 ``salt`` may be one of the ``crypt.METHOD_*`` values, or a string as
45 if salt is None or isinstance(salt, _Method):
46 salt = mksalt(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...]

Completed in 1247 milliseconds

1 2 3 4 5 6 7 8 91011>>