aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/dlies/dlies.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-03-30 18:27:18 +0000
committerlloyd <[email protected]>2009-03-30 18:27:18 +0000
commit96d6eb6f29c55e16a37cf11899547886f735b065 (patch)
tree9f13901e9b44c98d58b2589c9b09c6a7443eb7cd /src/pubkey/dlies/dlies.cpp
parent3cc3dd72c5f87b76852a55c1f2d1821dba967d8c (diff)
Thomas Moschny passed along a request from the Fedora packagers which came
up during the Fedora submission review, that each source file include some text about the license. One handy Perl script later and each file now has the line Distributed under the terms of the Botan license after the copyright notices. While I was in there modifying every file anyway, I also stripped out the remainder of the block comments (lots of astericks before and after the text); this is stylistic thing I picked up when I was first learning C++ but in retrospect it is not a good style as the structure makes it harder to modify comments (with the result that comments become fewer, shorter and are less likely to be updated, which are not good things).
Diffstat (limited to 'src/pubkey/dlies/dlies.cpp')
-rw-r--r--src/pubkey/dlies/dlies.cpp46
1 files changed, 24 insertions, 22 deletions
diff --git a/src/pubkey/dlies/dlies.cpp b/src/pubkey/dlies/dlies.cpp
index 62d74b9ee..c441ed17c 100644
--- a/src/pubkey/dlies/dlies.cpp
+++ b/src/pubkey/dlies/dlies.cpp
@@ -1,7 +1,9 @@
-/*************************************************
-* DLIES Source File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
+/*
+* DLIES
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#include <botan/dlies.h>
#include <botan/look_pk.h>
@@ -9,9 +11,9 @@
namespace Botan {
-/*************************************************
-* DLIES_Encryptor Constructor *
-*************************************************/
+/*
+* DLIES_Encryptor Constructor
+*/
DLIES_Encryptor::DLIES_Encryptor(const PK_Key_Agreement_Key& k,
KDF* kdf_obj,
MessageAuthenticationCode* mac_obj,
@@ -26,9 +28,9 @@ DLIES_Encryptor::~DLIES_Encryptor()
delete mac;
}
-/*************************************************
-* DLIES Encryption *
-*************************************************/
+/*
+* DLIES Encryption
+*/
SecureVector<byte> DLIES_Encryptor::enc(const byte in[], u32bit length,
RandomNumberGenerator&) const
{
@@ -63,25 +65,25 @@ SecureVector<byte> DLIES_Encryptor::enc(const byte in[], u32bit length,
return out;
}
-/*************************************************
-* Set the other parties public key *
-*************************************************/
+/*
+* Set the other parties public key
+*/
void DLIES_Encryptor::set_other_key(const MemoryRegion<byte>& ok)
{
other_key = ok;
}
-/*************************************************
-* Return the max size, in bytes, of a message *
-*************************************************/
+/*
+* Return the max size, in bytes, of a message
+*/
u32bit DLIES_Encryptor::maximum_input_size() const
{
return 32;
}
-/*************************************************
-* DLIES_Decryptor Constructor *
-*************************************************/
+/*
+* DLIES_Decryptor Constructor
+*/
DLIES_Decryptor::DLIES_Decryptor(const PK_Key_Agreement_Key& k,
KDF* kdf_obj,
MessageAuthenticationCode* mac_obj,
@@ -96,9 +98,9 @@ DLIES_Decryptor::~DLIES_Decryptor()
delete mac;
}
-/*************************************************
-* DLIES Decryption *
-*************************************************/
+/*
+* DLIES Decryption
+*/
SecureVector<byte> DLIES_Decryptor::dec(const byte msg[], u32bit length) const
{
const u32bit public_len = key.public_value().size();