Home
last modified time | relevance | path

Searched refs:key_size_in_bits (Results 1 – 5 of 5) sorted by relevance

/external/libchrome/crypto/
Dsymmetric_key_openssl.cc27 size_t key_size_in_bits) { in GenerateRandomKey() argument
33 if (key_size_in_bits != 128 && key_size_in_bits != 256) in GenerateRandomKey()
36 size_t key_size_in_bytes = key_size_in_bits / 8; in GenerateRandomKey()
37 DCHECK_EQ(key_size_in_bits, key_size_in_bytes * 8); in GenerateRandomKey()
56 size_t key_size_in_bits) { in DeriveKeyFromPassword() argument
63 if (key_size_in_bits != 128 && key_size_in_bits != 256) in DeriveKeyFromPassword()
67 size_t key_size_in_bytes = key_size_in_bits / 8; in DeriveKeyFromPassword()
68 DCHECK_EQ(key_size_in_bits, key_size_in_bytes * 8); in DeriveKeyFromPassword()
Dsymmetric_key_nss.cc21 size_t key_size_in_bits) { in GenerateRandomKey() argument
29 if (key_size_in_bits != 128 && key_size_in_bits != 256) in GenerateRandomKey()
37 key_size_in_bits / 8, NULL); in GenerateRandomKey()
49 size_t key_size_in_bits) { in DeriveKeyFromPassword() argument
51 if (salt.empty() || iterations == 0 || key_size_in_bits == 0) in DeriveKeyFromPassword()
58 if (key_size_in_bits != 128 && key_size_in_bits != 256) in DeriveKeyFromPassword()
79 key_size_in_bits / 8, in DeriveKeyFromPassword()
Dsymmetric_key_win.cc31 ALG_ID GetAESAlgIDForKeySize(size_t key_size_in_bits) { in GetAESAlgIDForKeySize() argument
33 switch (key_size_in_bits) { in GetAESAlgIDForKeySize()
102 bool GenerateAESKey(size_t key_size_in_bits, in GenerateAESKey() argument
108 ALG_ID alg = GetAESAlgIDForKeySize(key_size_in_bits); in GenerateAESKey()
140 bool CheckHMACKeySize(size_t key_size_in_bits, ALG_ID alg) { in CheckHMACKeySize() argument
161 return (key_size_in_bits >= (hash_size / 2 * 8) && in CheckHMACKeySize()
162 (key_size_in_bits % 8) == 0); in CheckHMACKeySize()
170 bool GenerateHMACKey(size_t key_size_in_bits, in GenerateHMACKey() argument
179 if (!CheckHMACKeySize(key_size_in_bits, alg)) in GenerateHMACKey()
190 DWORD key_size_in_bytes = static_cast<DWORD>(key_size_in_bits / 8); in GenerateHMACKey()
[all …]
Dsymmetric_key_unittest.cc73 unsigned int key_size_in_bits; member
96 test_data.rounds, test_data.key_size_in_bits)); in TEST_P()
101 EXPECT_EQ(test_data.key_size_in_bits / 8, raw_key.size()); in TEST_P()
Dsymmetric_key.h44 size_t key_size_in_bits);
55 size_t key_size_in_bits);