Lines Matching refs:crypto
15 scoped_ptr<crypto::SymmetricKey> key( in TEST()
16 crypto::SymmetricKey::DeriveKeyFromPassword( in TEST()
17 crypto::SymmetricKey::AES, "password", "saltiest", 1000, 256)); in TEST()
20 crypto::Encryptor encryptor; in TEST()
24 EXPECT_TRUE(encryptor.Init(key.get(), crypto::Encryptor::CBC, iv)); in TEST()
39 scoped_ptr<crypto::SymmetricKey> key( in TEST()
40 crypto::SymmetricKey::DeriveKeyFromPassword( in TEST()
41 crypto::SymmetricKey::AES, "password", "saltiest", 1000, 256)); in TEST()
46 scoped_ptr<crypto::SymmetricKey> wrong_key( in TEST()
47 crypto::SymmetricKey::DeriveKeyFromPassword( in TEST()
48 crypto::SymmetricKey::AES, "wrongword", "sweetest", 1000, 256)); in TEST()
53 scoped_ptr<crypto::SymmetricKey> wrong_key2( in TEST()
54 crypto::SymmetricKey::DeriveKeyFromPassword( in TEST()
55 crypto::SymmetricKey::AES, "wrongword+", "sweetest", 1000, 256)); in TEST()
59 scoped_ptr<crypto::SymmetricKey> wrong_key3( in TEST()
60 crypto::SymmetricKey::DeriveKeyFromPassword( in TEST()
61 crypto::SymmetricKey::AES, "wrongwordx", "sweetest", 1000, 256)); in TEST()
64 crypto::Encryptor encryptor; in TEST()
68 EXPECT_TRUE(encryptor.Init(key.get(), crypto::Encryptor::CBC, iv)); in TEST()
96 crypto::Encryptor decryptor; in TEST()
97 EXPECT_TRUE(decryptor.Init(wrong_key.get(), crypto::Encryptor::CBC, iv)); in TEST()
104 crypto::Encryptor decryptor2; in TEST()
105 EXPECT_TRUE(decryptor2.Init(wrong_key2.get(), crypto::Encryptor::CBC, iv)); in TEST()
110 crypto::Encryptor decryptor3; in TEST()
111 EXPECT_TRUE(decryptor3.Init(wrong_key3.get(), crypto::Encryptor::CBC, iv)); in TEST()
189 scoped_ptr<crypto::SymmetricKey> sym_key(crypto::SymmetricKey::Import( in TestAESCTREncrypt()
190 crypto::SymmetricKey::AES, key_str)); in TestAESCTREncrypt()
193 crypto::Encryptor encryptor; in TestAESCTREncrypt()
194 EXPECT_TRUE(encryptor.Init(sym_key.get(), crypto::Encryptor::CTR, "")); in TestAESCTREncrypt()
221 scoped_ptr<crypto::SymmetricKey> sym_key(crypto::SymmetricKey::Import( in TestAESCTRMultipleDecrypt()
222 crypto::SymmetricKey::AES, key_str)); in TestAESCTRMultipleDecrypt()
225 crypto::Encryptor encryptor; in TestAESCTRMultipleDecrypt()
226 EXPECT_TRUE(encryptor.Init(sym_key.get(), crypto::Encryptor::CTR, "")); in TestAESCTRMultipleDecrypt()
284 scoped_ptr<crypto::SymmetricKey> key( in TEST()
285 crypto::SymmetricKey::GenerateRandomKey(crypto::SymmetricKey::AES, 128)); in TEST()
290 crypto::Encryptor encryptor; in TEST()
291 EXPECT_TRUE(encryptor.Init(key.get(), crypto::Encryptor::CTR, "")); in TEST()
321 crypto::Encryptor::Counter counter1( in TEST()
336 crypto::Encryptor::Counter counter2( in TEST()
348 crypto::Encryptor::Counter counter3( in TEST()
407 scoped_ptr<crypto::SymmetricKey> sym_key(crypto::SymmetricKey::Import( in TEST()
408 crypto::SymmetricKey::AES, key)); in TEST()
411 crypto::Encryptor encryptor; in TEST()
415 EXPECT_TRUE(encryptor.Init(sym_key.get(), crypto::Encryptor::CBC, iv)); in TEST()
440 scoped_ptr<crypto::SymmetricKey> sym_key(crypto::SymmetricKey::Import( in TEST()
441 crypto::SymmetricKey::AES, key)); in TEST()
444 crypto::Encryptor encryptor; in TEST()
447 EXPECT_TRUE(encryptor.Init(sym_key.get(), crypto::Encryptor::CBC, iv)); in TEST()
466 scoped_ptr<crypto::SymmetricKey> sym_key(crypto::SymmetricKey::Import( in TEST()
467 crypto::SymmetricKey::AES, key)); in TEST()
470 crypto::Encryptor encryptor; in TEST()
473 EXPECT_TRUE(encryptor.Init(sym_key.get(), crypto::Encryptor::CBC, iv)); in TEST()
491 scoped_ptr<crypto::SymmetricKey> sym_key(crypto::SymmetricKey::Import( in TEST()
492 crypto::SymmetricKey::AES, key)); in TEST()
495 crypto::Encryptor encryptor; in TEST()
498 EXPECT_FALSE(encryptor.Init(sym_key.get(), crypto::Encryptor::CBC, iv)); in TEST()
505 scoped_ptr<crypto::SymmetricKey> sym_key(crypto::SymmetricKey::Import( in TEST()
506 crypto::SymmetricKey::AES, key)); in TEST()
509 crypto::Encryptor encryptor; in TEST()
510 EXPECT_FALSE(encryptor.Init(sym_key.get(), crypto::Encryptor::CBC, iv)); in TEST()
519 scoped_ptr<crypto::SymmetricKey> sym_key(crypto::SymmetricKey::Import( in TEST()
520 crypto::SymmetricKey::AES, key)); in TEST()
523 crypto::Encryptor encryptor; in TEST()
526 EXPECT_TRUE(encryptor.Init(sym_key.get(), crypto::Encryptor::CBC, iv)); in TEST()
538 scoped_ptr<crypto::SymmetricKey> sym_key(crypto::SymmetricKey::Import( in TEST()
539 crypto::SymmetricKey::AES, key)); in TEST()
542 crypto::Encryptor encryptor; in TEST()
545 EXPECT_TRUE(encryptor.Init(sym_key.get(), crypto::Encryptor::CBC, iv)); in TEST()