From 96d6eb6f29c55e16a37cf11899547886f735b065 Mon Sep 17 00:00:00 2001 From: lloyd Date: Mon, 30 Mar 2009 18:27:18 +0000 Subject: 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). --- src/mac/cbc_mac/cbc_mac.cpp | 58 +++++++++++++++++++++++---------------------- src/mac/cbc_mac/cbc_mac.h | 16 +++++++------ 2 files changed, 39 insertions(+), 35 deletions(-) (limited to 'src/mac/cbc_mac') diff --git a/src/mac/cbc_mac/cbc_mac.cpp b/src/mac/cbc_mac/cbc_mac.cpp index cbbf77991..f5d9e1567 100644 --- a/src/mac/cbc_mac/cbc_mac.cpp +++ b/src/mac/cbc_mac/cbc_mac.cpp @@ -1,7 +1,9 @@ -/************************************************* -* CBC-MAC Source File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* CBC-MAC +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #include #include @@ -9,9 +11,9 @@ namespace Botan { -/************************************************* -* Update an CBC-MAC Calculation * -*************************************************/ +/* +* Update an CBC-MAC Calculation +*/ void CBC_MAC::add_data(const byte input[], u32bit length) { u32bit xored = std::min(OUTPUT_LENGTH - position, length); @@ -36,9 +38,9 @@ void CBC_MAC::add_data(const byte input[], u32bit length) position = length; } -/************************************************* -* Finalize an CBC-MAC Calculation * -*************************************************/ +/* +* Finalize an CBC-MAC Calculation +*/ void CBC_MAC::final_result(byte mac[]) { if(position) @@ -49,17 +51,17 @@ void CBC_MAC::final_result(byte mac[]) position = 0; } -/************************************************* -* CBC-MAC Key Schedule * -*************************************************/ +/* +* CBC-MAC Key Schedule +*/ void CBC_MAC::key_schedule(const byte key[], u32bit length) { e->set_key(key, length); } -/************************************************* -* Clear memory of sensitive data * -*************************************************/ +/* +* Clear memory of sensitive data +*/ void CBC_MAC::clear() throw() { e->clear(); @@ -67,25 +69,25 @@ void CBC_MAC::clear() throw() position = 0; } -/************************************************* -* Return the name of this type * -*************************************************/ +/* +* Return the name of this type +*/ std::string CBC_MAC::name() const { return "CBC-MAC(" + e->name() + ")"; } -/************************************************* -* Return a clone of this object * -*************************************************/ +/* +* Return a clone of this object +*/ MessageAuthenticationCode* CBC_MAC::clone() const { return new CBC_MAC(e->clone()); } -/************************************************* -* CBC-MAC Constructor * -*************************************************/ +/* +* CBC-MAC Constructor +*/ CBC_MAC::CBC_MAC(BlockCipher* e_in) : MessageAuthenticationCode(e_in->BLOCK_SIZE, e_in->MINIMUM_KEYLENGTH, @@ -96,9 +98,9 @@ CBC_MAC::CBC_MAC(BlockCipher* e_in) : position = 0; } -/************************************************* -* CBC-MAC Destructor * -*************************************************/ +/* +* CBC-MAC Destructor +*/ CBC_MAC::~CBC_MAC() { delete e; diff --git a/src/mac/cbc_mac/cbc_mac.h b/src/mac/cbc_mac/cbc_mac.h index 1112970d6..d17d792d3 100644 --- a/src/mac/cbc_mac/cbc_mac.h +++ b/src/mac/cbc_mac/cbc_mac.h @@ -1,7 +1,9 @@ -/************************************************* -* CBC-MAC Header File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* CBC-MAC +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #ifndef BOTAN_CBC_MAC_H__ #define BOTAN_CBC_MAC_H__ @@ -11,9 +13,9 @@ namespace Botan { -/************************************************* -* CBC-MAC * -*************************************************/ +/* +* CBC-MAC +*/ class BOTAN_DLL CBC_MAC : public MessageAuthenticationCode { public: -- cgit v1.2.3