diff options
author | Jack Lloyd <[email protected]> | 2016-11-12 01:53:56 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-11-12 01:53:56 -0500 |
commit | 9c72dabc9dc73e2603c22dfce48611b5b626238b (patch) | |
tree | bda4f84f78bfbdd28e2199ee8f9998b08cc3c634 /src/lib/pubkey/pk_ops.h | |
parent | 618f890fd7ede74c728612ca8bc590c72ee353f1 (diff) |
Pubkey cleanups
Add Public_Key::key_length usable for policy checking (as in
TLS::Policy::check_peer_key_acceptable)
Remove Public_Key::max_input_bits because it didn't make much sense
for most algorithms actually.
Remove message_parts and message_part_size from PK_Ops
Diffstat (limited to 'src/lib/pubkey/pk_ops.h')
-rw-r--r-- | src/lib/pubkey/pk_ops.h | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/src/lib/pubkey/pk_ops.h b/src/lib/pubkey/pk_ops.h index 2eb4b8930..57774c3f4 100644 --- a/src/lib/pubkey/pk_ops.h +++ b/src/lib/pubkey/pk_ops.h @@ -26,12 +26,12 @@ namespace PK_Ops { class BOTAN_DLL Encryption { public: - virtual size_t max_input_bits() const = 0; - virtual secure_vector<byte> encrypt(const byte msg[], size_t msg_len, RandomNumberGenerator& rng) = 0; + virtual size_t max_input_bits() const = 0; + virtual ~Encryption() {} }; @@ -41,8 +41,6 @@ class BOTAN_DLL Encryption class BOTAN_DLL Decryption { public: - virtual size_t max_input_bits() const = 0; - virtual secure_vector<byte> decrypt(byte& valid_mask, const byte ciphertext[], size_t ciphertext_len) = 0; @@ -69,24 +67,6 @@ class BOTAN_DLL Verification */ virtual bool is_valid_signature(const byte sig[], size_t sig_len) = 0; - /** - * Get the maximum message size in bits supported by this public key. - * @return maximum message in bits - */ - virtual size_t max_input_bits() const = 0; - - /** - * Find out the number of message parts supported by this scheme. - * @return number of message parts - */ - virtual size_t message_parts() const { return 1; } - - /** - * Find out the message part size supported by this scheme/key. - * @return size of the message parts - */ - virtual size_t message_part_size() const { return 0; } - virtual ~Verification() {} }; @@ -96,18 +76,6 @@ class BOTAN_DLL Verification class BOTAN_DLL Signature { public: - /** - * Find out the number of message parts supported by this scheme. - * @return number of message parts - */ - virtual size_t message_parts() const { return 1; } - - /** - * Find out the message part size supported by this scheme/key. - * @return size of the message parts - */ - virtual size_t message_part_size() const { return 0; } - /* * Add more data to the message currently being signed * @param msg the message |