| Index: net/http/des.cc
|
| diff --git a/net/http/des.cc b/net/http/des.cc
|
| index 4fce9ccd00d028df5f738a1eca0d1d1dd5e22705..4f050225479ffb0db29b316ed106b44d9d98cd74 100644
|
| --- a/net/http/des.cc
|
| +++ b/net/http/des.cc
|
| @@ -4,16 +4,10 @@
|
|
|
| #include "net/http/des.h"
|
|
|
| -#include "base/logging.h"
|
| -
|
| -#if defined(USE_OPENSSL)
|
| #include <openssl/des.h>
|
| +
|
| +#include "base/logging.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)
|
| -
|
| -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
|
|
|