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/codec/pem | |
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/codec/pem')
-rw-r--r-- | src/codec/pem/pem.cpp | 40 | ||||
-rw-r--r-- | src/codec/pem/pem.h | 16 |
2 files changed, 30 insertions, 26 deletions
diff --git a/src/codec/pem/pem.cpp b/src/codec/pem/pem.cpp index fb0be6fd5..5141bee21 100644 --- a/src/codec/pem/pem.cpp +++ b/src/codec/pem/pem.cpp @@ -1,7 +1,9 @@ -/************************************************* -* PEM Encoding/Decoding Source File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* PEM Encoding/Decoding +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #include <botan/pem.h> #include <botan/filters.h> @@ -11,9 +13,9 @@ namespace Botan { namespace PEM_Code { -/************************************************* -* PEM encode BER/DER-encoded objects * -*************************************************/ +/* +* PEM encode BER/DER-encoded objects +*/ std::string encode(const byte der[], u32bit length, const std::string& label, u32bit width) { @@ -25,18 +27,18 @@ std::string encode(const byte der[], u32bit length, const std::string& label, return (PEM_HEADER + pipe.read_all_as_string() + PEM_TRAILER); } -/************************************************* -* PEM encode BER/DER-encoded objects * -*************************************************/ +/* +* PEM encode BER/DER-encoded objects +*/ std::string encode(const MemoryRegion<byte>& data, const std::string& label, u32bit width) { return encode(data, data.size(), label, width); } -/************************************************* -* Decode PEM down to raw BER/DER * -*************************************************/ +/* +* Decode PEM down to raw BER/DER +*/ SecureVector<byte> decode_check_label(DataSource& source, const std::string& label_want) { @@ -48,9 +50,9 @@ SecureVector<byte> decode_check_label(DataSource& source, return ber; } -/************************************************* -* Decode PEM down to raw BER/DER * -*************************************************/ +/* +* Decode PEM down to raw BER/DER +*/ SecureVector<byte> decode(DataSource& source, std::string& label) { const u32bit RANDOM_CHAR_LIMIT = 8; @@ -108,9 +110,9 @@ SecureVector<byte> decode(DataSource& source, std::string& label) return base64.read_all(); } -/************************************************* -* Search for a PEM signature * -*************************************************/ +/* +* Search for a PEM signature +*/ bool matches(DataSource& source, const std::string& extra, u32bit search_range) { diff --git a/src/codec/pem/pem.h b/src/codec/pem/pem.h index e9f14ddc2..9fe8acb87 100644 --- a/src/codec/pem/pem.h +++ b/src/codec/pem/pem.h @@ -1,7 +1,9 @@ -/************************************************* -* PEM Encoding/Decoding Header File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* PEM Encoding/Decoding +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #ifndef BOTAN_PEM_H__ #define BOTAN_PEM_H__ @@ -12,9 +14,9 @@ namespace Botan { namespace PEM_Code { -/************************************************* -* PEM Encoding/Decoding * -*************************************************/ +/* +* PEM Encoding/Decoding +*/ BOTAN_DLL std::string encode(const byte[], u32bit, const std::string&, u32bit = 64); BOTAN_DLL std::string encode(const MemoryRegion<byte>&, |