Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1720)

Unified Diff: crypto/encryptor_unittest.cc

Issue 8418034: Make string_util::WriteInto() DCHECK() that the supplied |length_with_null| > 1, meaning that the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « crypto/encryptor_openssl.cc ('k') | crypto/encryptor_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/encryptor_unittest.cc
===================================================================
--- crypto/encryptor_unittest.cc (revision 111826)
+++ crypto/encryptor_unittest.cc (working copy)
@@ -281,21 +281,3 @@
EXPECT_EQ(expected_ciphertext_hex, base::HexEncode(ciphertext.data(),
ciphertext.size()));
}
-
-TEST(EncryptorTest, EmptyDecrypt) {
- std::string key = "128=SixteenBytes";
- std::string iv = "Sweet Sixteen IV";
-
- scoped_ptr<crypto::SymmetricKey> sym_key(crypto::SymmetricKey::Import(
- crypto::SymmetricKey::AES, key));
- ASSERT_TRUE(NULL != sym_key.get());
-
- crypto::Encryptor encryptor;
- // The IV must be exactly as long a the cipher block size.
- EXPECT_EQ(16U, iv.size());
- EXPECT_TRUE(encryptor.Init(sym_key.get(), crypto::Encryptor::CBC, iv));
-
- std::string decrypted;
- EXPECT_FALSE(encryptor.Decrypt("", &decrypted));
- EXPECT_EQ("", decrypted);
-}
« no previous file with comments | « crypto/encryptor_openssl.cc ('k') | crypto/encryptor_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698