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/pk_pad/emsa4 | |
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/pk_pad/emsa4')
-rw-r--r-- | src/pk_pad/emsa4/emsa4.cpp | 46 | ||||
-rw-r--r-- | src/pk_pad/emsa4/emsa4.h | 16 |
2 files changed, 33 insertions, 29 deletions
diff --git a/src/pk_pad/emsa4/emsa4.cpp b/src/pk_pad/emsa4/emsa4.cpp index 038489e15..cff9a1537 100644 --- a/src/pk_pad/emsa4/emsa4.cpp +++ b/src/pk_pad/emsa4/emsa4.cpp @@ -1,7 +1,9 @@ -/************************************************* -* EMSA4 Source File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* EMSA4 +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #include <botan/emsa4.h> #include <botan/mgf1.h> @@ -9,25 +11,25 @@ namespace Botan { -/************************************************* -* EMSA4 Update Operation * -*************************************************/ +/* +* EMSA4 Update Operation +*/ void EMSA4::update(const byte input[], u32bit length) { hash->update(input, length); } -/************************************************* -* Return the raw (unencoded) data * -*************************************************/ +/* +* Return the raw (unencoded) data +*/ SecureVector<byte> EMSA4::raw_data() { return hash->final(); } -/************************************************* -* EMSA4 Encode Operation * -*************************************************/ +/* +* EMSA4 Encode Operation +*/ SecureVector<byte> EMSA4::encoding_of(const MemoryRegion<byte>& msg, u32bit output_bits, RandomNumberGenerator& rng) @@ -62,9 +64,9 @@ SecureVector<byte> EMSA4::encoding_of(const MemoryRegion<byte>& msg, return EM; } -/************************************************* -* EMSA4 Decode/Verify Operation * -*************************************************/ +/* +* EMSA4 Decode/Verify Operation +*/ bool EMSA4::verify(const MemoryRegion<byte>& const_coded, const MemoryRegion<byte>& raw, u32bit key_bits) throw() { @@ -120,18 +122,18 @@ bool EMSA4::verify(const MemoryRegion<byte>& const_coded, return (H == H2); } -/************************************************* -* EMSA4 Constructor * -*************************************************/ +/* +* EMSA4 Constructor +*/ EMSA4::EMSA4(HashFunction* h) : SALT_SIZE(h->OUTPUT_LENGTH), hash(h) { mgf = new MGF1(hash->clone()); } -/************************************************* -* EMSA4 Constructor * -*************************************************/ +/* +* EMSA4 Constructor +*/ EMSA4::EMSA4(HashFunction* h, u32bit salt_size) : SALT_SIZE(salt_size), hash(h) { diff --git a/src/pk_pad/emsa4/emsa4.h b/src/pk_pad/emsa4/emsa4.h index 190725926..b716178a9 100644 --- a/src/pk_pad/emsa4/emsa4.h +++ b/src/pk_pad/emsa4/emsa4.h @@ -1,7 +1,9 @@ -/************************************************* -* EMSA4 Header File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* EMSA4 +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #ifndef BOTAN_EMSA4_H__ #define BOTAN_EMSA4_H__ @@ -12,9 +14,9 @@ namespace Botan { -/************************************************* -* EMSA4 * -*************************************************/ +/* +* EMSA4 +*/ class BOTAN_DLL EMSA4 : public EMSA { public: |