Chromium Code Reviews| Index: net/http/des.cc |
| diff --git a/net/http/des.cc b/net/http/des.cc |
| index 4fce9ccd00d028df5f738a1eca0d1d1dd5e22705..a4a12ce71cbbf59680b9abfe043fc27509d5f939 100644 |
| --- a/net/http/des.cc |
| +++ b/net/http/des.cc |
| @@ -6,14 +6,8 @@ |
| #include "base/logging.h" |
| -#if defined(USE_OPENSSL) |
| #include <openssl/des.h> |
| #include "crypto/openssl_util.h" |
| -#elif defined(OS_IOS) |
| -#include <CommonCrypto/CommonCryptor.h> |
| -#else |
| -#error "Unknown platform" |
| -#endif |
| // The iOS version of DESEncrypt is our own code. |
| // DESSetKeyParity and DESMakeKey are based on |
| @@ -80,8 +74,6 @@ void DESMakeKey(const uint8_t* raw, uint8_t* key) { |
| key[7] = DESSetKeyParity((raw[6] << 1)); |
| } |
| -#if defined(USE_OPENSSL) |
| - |
| void DESEncrypt(const uint8_t* key, const uint8_t* src, uint8_t* hash) { |
| crypto::EnsureOpenSSLInit(); |
| @@ -93,17 +85,4 @@ void DESEncrypt(const uint8_t* key, const uint8_t* src, uint8_t* hash) { |
| reinterpret_cast<DES_cblock*>(hash), &ks, DES_ENCRYPT); |
| } |
| -#elif defined(OS_IOS) |
|
Ryan Sleevi
2016/04/18 14:23:30
I'm torn on this.
Semantically, your change is co
svaldez
2016/04/18 15:09:35
Acknowledged.
|
| - |
| -void DESEncrypt(const uint8_t* key, const uint8_t* src, uint8_t* hash) { |
| - CCCryptorStatus status; |
| - size_t data_out_moved = 0; |
| - status = CCCrypt(kCCEncrypt, kCCAlgorithmDES, kCCOptionECBMode, |
| - key, 8, NULL, src, 8, hash, 8, &data_out_moved); |
| - DCHECK(status == kCCSuccess); |
| - DCHECK(data_out_moved == 8); |
| -} |
| - |
| -#endif |
| - |
| } // namespace net |