| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "crypto/symmetric_key.h" | 5 #include "crypto/symmetric_key.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 crypto::SymmetricKey::HMAC_SHA1, | 165 crypto::SymmetricKey::HMAC_SHA1, |
| 166 "password", | 166 "password", |
| 167 "ATHENA.MIT.EDUraeburn", | 167 "ATHENA.MIT.EDUraeburn", |
| 168 1200, | 168 1200, |
| 169 160, | 169 160, |
| 170 "5c08eb61fdf71e4e4ec3cf6ba1f5512ba7e52ddb", | 170 "5c08eb61fdf71e4e4ec3cf6ba1f5512ba7e52ddb", |
| 171 }, | 171 }, |
| 172 { | 172 { |
| 173 crypto::SymmetricKey::HMAC_SHA1, | 173 crypto::SymmetricKey::HMAC_SHA1, |
| 174 "password", | 174 "password", |
| 175 "\0224VxxV4\022", /* 0x1234567878563412 */ | 175 "\022" "4VxxV4\022", /* 0x1234567878563412 */ |
| 176 5, | 176 5, |
| 177 160, | 177 160, |
| 178 "d1daa78615f287e6a1c8b120d7062a493f98d203", | 178 "d1daa78615f287e6a1c8b120d7062a493f98d203", |
| 179 }, | 179 }, |
| 180 { | 180 { |
| 181 crypto::SymmetricKey::HMAC_SHA1, | 181 crypto::SymmetricKey::HMAC_SHA1, |
| 182 "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", | 182 "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", |
| 183 "pass phrase equals block size", | 183 "pass phrase equals block size", |
| 184 1200, | 184 1200, |
| 185 160, | 185 160, |
| (...skipping 30 matching lines...) Expand all Loading... |
| 216 "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", | 216 "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", |
| 217 "pass phrase exceeds block size", | 217 "pass phrase exceeds block size", |
| 218 20, | 218 20, |
| 219 256, | 219 256, |
| 220 "e0739745dc28b8721ba402e05214d2ac1eab54cf72bee1fba388297a09eb493c", | 220 "e0739745dc28b8721ba402e05214d2ac1eab54cf72bee1fba388297a09eb493c", |
| 221 }, | 221 }, |
| 222 }; | 222 }; |
| 223 | 223 |
| 224 INSTANTIATE_TEST_CASE_P(, SymmetricKeyDeriveKeyFromPasswordTest, | 224 INSTANTIATE_TEST_CASE_P(, SymmetricKeyDeriveKeyFromPasswordTest, |
| 225 testing::ValuesIn(kTestVectors)); | 225 testing::ValuesIn(kTestVectors)); |
| OLD | NEW |