mirror of
https://github.com/AGWA/git-crypt.git
synced 2025-12-22 23:26:11 -08:00
Make Aes_impl and Hmac_impl private member classes
This commit is contained in:
@@ -43,7 +43,7 @@ void init_crypto ()
|
|||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Aes_impl {
|
struct Aes_ecb_encryptor::Aes_impl {
|
||||||
AES_KEY key;
|
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));
|
AES_encrypt(plain, cipher, &(impl->key));
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Hmac_impl {
|
struct Hmac_sha1_state::Hmac_impl {
|
||||||
HMAC_CTX ctx;
|
HMAC_CTX ctx;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -47,8 +47,6 @@ struct Crypto_error {
|
|||||||
Crypto_error (const std::string& w, const std::string& m) : where(w), message(m) { }
|
Crypto_error (const std::string& w, const std::string& m) : where(w), message(m) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Aes_impl;
|
|
||||||
|
|
||||||
class Aes_ecb_encryptor {
|
class Aes_ecb_encryptor {
|
||||||
public:
|
public:
|
||||||
enum {
|
enum {
|
||||||
@@ -57,6 +55,8 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
struct Aes_impl;
|
||||||
|
|
||||||
std::auto_ptr<Aes_impl> impl;
|
std::auto_ptr<Aes_impl> impl;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -91,8 +91,6 @@ public:
|
|||||||
|
|
||||||
typedef Aes_ctr_encryptor Aes_ctr_decryptor;
|
typedef Aes_ctr_encryptor Aes_ctr_decryptor;
|
||||||
|
|
||||||
struct Hmac_impl;
|
|
||||||
|
|
||||||
class Hmac_sha1_state {
|
class Hmac_sha1_state {
|
||||||
public:
|
public:
|
||||||
enum {
|
enum {
|
||||||
@@ -101,6 +99,8 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
struct Hmac_impl;
|
||||||
|
|
||||||
std::auto_ptr<Hmac_impl> impl;
|
std::auto_ptr<Hmac_impl> impl;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user