Make Aes_impl and Hmac_impl private member classes

This commit is contained in:
Andrew Ayer
2014-07-07 22:29:13 -07:00
parent 0210fd7541
commit 22bae167b0
2 changed files with 6 additions and 6 deletions

View File

@@ -43,7 +43,7 @@ void init_crypto ()
ERR_load_crypto_strings();
}
struct Aes_impl {
struct Aes_ecb_encryptor::Aes_impl {
AES_KEY key;
};
@@ -66,7 +66,7 @@ void Aes_ecb_encryptor::encrypt(const unsigned char* plain, unsigned char* ciphe
AES_encrypt(plain, cipher, &(impl->key));
}
struct Hmac_impl {
struct Hmac_sha1_state::Hmac_impl {
HMAC_CTX ctx;
};

View File

@@ -47,8 +47,6 @@ struct Crypto_error {
Crypto_error (const std::string& w, const std::string& m) : where(w), message(m) { }
};
struct Aes_impl;
class Aes_ecb_encryptor {
public:
enum {
@@ -57,6 +55,8 @@ public:
};
private:
struct Aes_impl;
std::auto_ptr<Aes_impl> impl;
public:
@@ -91,8 +91,6 @@ public:
typedef Aes_ctr_encryptor Aes_ctr_decryptor;
struct Hmac_impl;
class Hmac_sha1_state {
public:
enum {
@@ -101,6 +99,8 @@ public:
};
private:
struct Hmac_impl;
std::auto_ptr<Hmac_impl> impl;
public: