aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-06-16 14:53:52 +0000
committerlloyd <[email protected]>2008-06-16 14:53:52 +0000
commit4dc7c95a6cdbcca2c9e15c5d34f7d1e7ee181773 (patch)
tree21fc6347a1154b6ede9bf536308e8556c56529d0 /src
parent82a1df8942be8551ab365db20e35ca6a2b7e0d85 (diff)
Delete the public key filter classes. Advertised on the devel list previously:
http://lists.randombit.net/pipermail/botan-devel/2008-June/000559.html
Diffstat (limited to 'src')
-rw-r--r--src/pk_filts.cpp115
1 files changed, 0 insertions, 115 deletions
diff --git a/src/pk_filts.cpp b/src/pk_filts.cpp
deleted file mode 100644
index 85ba6638a..000000000
--- a/src/pk_filts.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-/*************************************************
-* PK Filters Source File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#include <botan/pk_filts.h>
-#include <botan/libstate.h>
-
-namespace Botan {
-
-/*************************************************
-* Append to the buffer *
-*************************************************/
-void PK_Encryptor_Filter::write(const byte input[], u32bit length)
- {
- buffer.append(input, length);
- }
-
-/*************************************************
-* Encrypt the message *
-*************************************************/
-void PK_Encryptor_Filter::end_msg()
- {
- send(cipher->encrypt(buffer, buffer.size(),
- global_state().prng_reference()));
- buffer.destroy();
- }
-
-/*************************************************
-* Append to the buffer *
-*************************************************/
-void PK_Decryptor_Filter::write(const byte input[], u32bit length)
- {
- buffer.append(input, length);
- }
-
-/*************************************************
-* Decrypt the message *
-*************************************************/
-void PK_Decryptor_Filter::end_msg()
- {
- send(cipher->decrypt(buffer, buffer.size()));
- buffer.destroy();
- }
-
-/*************************************************
-* Add more data *
-*************************************************/
-void PK_Signer_Filter::write(const byte input[], u32bit length)
- {
- signer->update(input, length);
- }
-
-/*************************************************
-* Sign the message *
-*************************************************/
-void PK_Signer_Filter::end_msg()
- {
- send(signer->signature(global_state().prng_reference()));
- }
-
-/*************************************************
-* Add more data *
-*************************************************/
-void PK_Verifier_Filter::write(const byte input[], u32bit length)
- {
- verifier->update(input, length);
- }
-
-/*************************************************
-* Verify the message *
-*************************************************/
-void PK_Verifier_Filter::end_msg()
- {
- if(signature.is_empty())
- throw Exception("PK_Verifier_Filter: No signature to check against");
- bool is_valid = verifier->check_signature(signature, signature.size());
- send((is_valid ? 1 : 0));
- }
-
-/*************************************************
-* Set the signature to check *
-*************************************************/
-void PK_Verifier_Filter::set_signature(const byte sig[], u32bit length)
- {
- signature.set(sig, length);
- }
-
-/*************************************************
-* Set the signature to check *
-*************************************************/
-void PK_Verifier_Filter::set_signature(const MemoryRegion<byte>& sig)
- {
- signature = sig;
- }
-
-/*************************************************
-* PK_Verifier_Filter Constructor *
-*************************************************/
-PK_Verifier_Filter::PK_Verifier_Filter(PK_Verifier* v, const byte sig[],
- u32bit length) :
- verifier(v), signature(sig, length)
- {
- }
-
-/*************************************************
-* PK_Verifier_Filter Constructor *
-*************************************************/
-PK_Verifier_Filter::PK_Verifier_Filter(PK_Verifier* v,
- const MemoryRegion<byte>& sig) :
- verifier(v), signature(sig)
- {
- }
-
-}