diff options
author | lloyd <[email protected]> | 2009-03-30 18:27:18 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-03-30 18:27:18 +0000 |
commit | 96d6eb6f29c55e16a37cf11899547886f735b065 (patch) | |
tree | 9f13901e9b44c98d58b2589c9b09c6a7443eb7cd /src/modes/ecb | |
parent | 3cc3dd72c5f87b76852a55c1f2d1821dba967d8c (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/modes/ecb')
-rw-r--r-- | src/modes/ecb/ecb.cpp | 46 | ||||
-rw-r--r-- | src/modes/ecb/ecb.h | 28 |
2 files changed, 39 insertions, 35 deletions
diff --git a/src/modes/ecb/ecb.cpp b/src/modes/ecb/ecb.cpp index b76e86ad9..8da0a4802 100644 --- a/src/modes/ecb/ecb.cpp +++ b/src/modes/ecb/ecb.cpp @@ -1,15 +1,17 @@ -/************************************************* -* ECB Mode Source File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* ECB Mode +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #include <botan/ecb.h> namespace Botan { -/************************************************* -* Verify the IV is not set * -*************************************************/ +/* +* Verify the IV is not set +*/ bool ECB::valid_iv_size(u32bit iv_size) const { if(iv_size == 0) @@ -17,17 +19,17 @@ bool ECB::valid_iv_size(u32bit iv_size) const return false; } -/************************************************* -* Return an ECB mode name * -*************************************************/ +/* +* Return an ECB mode name +*/ std::string ECB::name() const { return (cipher->name() + "/" + mode_name + "/" + padder->name()); } -/************************************************* -* Encrypt in ECB mode * -*************************************************/ +/* +* Encrypt in ECB mode +*/ void ECB_Encryption::write(const byte input[], u32bit length) { buffer.copy(position, input, length); @@ -50,9 +52,9 @@ void ECB_Encryption::write(const byte input[], u32bit length) position += length; } -/************************************************* -* Finish encrypting in ECB mode * -*************************************************/ +/* +* Finish encrypting in ECB mode +*/ void ECB_Encryption::end_msg() { SecureVector<byte> padding(BLOCK_SIZE); @@ -62,9 +64,9 @@ void ECB_Encryption::end_msg() throw Encoding_Error(name() + ": Did not pad to full blocksize"); } -/************************************************* -* Decrypt in ECB mode * -*************************************************/ +/* +* Decrypt in ECB mode +*/ void ECB_Decryption::write(const byte input[], u32bit length) { buffer.copy(position, input, length); @@ -87,9 +89,9 @@ void ECB_Decryption::write(const byte input[], u32bit length) position += length; } -/************************************************* -* Finish decrypting in ECB mode * -*************************************************/ +/* +* Finish decrypting in ECB mode +*/ void ECB_Decryption::end_msg() { if(position != BLOCK_SIZE) diff --git a/src/modes/ecb/ecb.h b/src/modes/ecb/ecb.h index 81fee28d2..5230f9b14 100644 --- a/src/modes/ecb/ecb.h +++ b/src/modes/ecb/ecb.h @@ -1,7 +1,9 @@ -/************************************************* -* ECB Mode Header File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* ECB Mode +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #ifndef BOTAN_ECB_H__ #define BOTAN_ECB_H__ @@ -12,9 +14,9 @@ namespace Botan { -/************************************************* -* ECB * -*************************************************/ +/* +* ECB +*/ class BOTAN_DLL ECB : public BlockCipherMode { protected: @@ -28,9 +30,9 @@ class BOTAN_DLL ECB : public BlockCipherMode bool valid_iv_size(u32bit) const; }; -/************************************************* -* ECB Encryption * -*************************************************/ +/* +* ECB Encryption +*/ class BOTAN_DLL ECB_Encryption : public ECB { public: @@ -47,9 +49,9 @@ class BOTAN_DLL ECB_Encryption : public ECB void end_msg(); }; -/************************************************* -* ECB Decryption * -*************************************************/ +/* +* ECB Decryption +*/ class BOTAN_DLL ECB_Decryption : public ECB { public: |