aboutsummaryrefslogtreecommitdiffstats
path: root/src/pk_pad
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/pk_pad
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/pk_pad')
-rw-r--r--src/pk_pad/eme.cpp34
-rw-r--r--src/pk_pad/eme.h16
-rw-r--r--src/pk_pad/eme1/eme1.cpp34
-rw-r--r--src/pk_pad/eme1/eme1.h16
-rw-r--r--src/pk_pad/eme_pkcs/eme_pkcs.cpp28
-rw-r--r--src/pk_pad/eme_pkcs/eme_pkcs.h16
-rw-r--r--src/pk_pad/emsa.h16
-rw-r--r--src/pk_pad/emsa1/emsa1.cpp34
-rw-r--r--src/pk_pad/emsa1/emsa1.h16
-rw-r--r--src/pk_pad/emsa1_bsi/emsa1_bsi.cpp18
-rw-r--r--src/pk_pad/emsa1_bsi/emsa1_bsi.h12
-rw-r--r--src/pk_pad/emsa2/emsa2.cpp46
-rw-r--r--src/pk_pad/emsa2/emsa2.h16
-rw-r--r--src/pk_pad/emsa3/emsa3.cpp2
-rw-r--r--src/pk_pad/emsa3/emsa3.h2
-rw-r--r--src/pk_pad/emsa4/emsa4.cpp46
-rw-r--r--src/pk_pad/emsa4/emsa4.h16
-rw-r--r--src/pk_pad/emsa_raw/emsa_raw.cpp34
-rw-r--r--src/pk_pad/emsa_raw/emsa_raw.h16
-rw-r--r--src/pk_pad/hash_id/hash_id.cpp4
-rw-r--r--src/pk_pad/hash_id/hash_id.h16
21 files changed, 240 insertions, 198 deletions
diff --git a/src/pk_pad/eme.cpp b/src/pk_pad/eme.cpp
index ca618889b..74bba5ac1 100644
--- a/src/pk_pad/eme.cpp
+++ b/src/pk_pad/eme.cpp
@@ -1,15 +1,17 @@
-/*************************************************
-* EME Base Class Source File *
-* (C) 1999-2008 Jack Lloyd *
-*************************************************/
+/*
+* EME Base Class
+* (C) 1999-2008 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#include <botan/eme.h>
namespace Botan {
-/*************************************************
-* Encode a message *
-*************************************************/
+/*
+* Encode a message
+*/
SecureVector<byte> EME::encode(const byte msg[], u32bit msg_len,
u32bit key_bits,
RandomNumberGenerator& rng) const
@@ -17,9 +19,9 @@ SecureVector<byte> EME::encode(const byte msg[], u32bit msg_len,
return pad(msg, msg_len, key_bits, rng);
}
-/*************************************************
-* Encode a message *
-*************************************************/
+/*
+* Encode a message
+*/
SecureVector<byte> EME::encode(const MemoryRegion<byte>& msg,
u32bit key_bits,
RandomNumberGenerator& rng) const
@@ -27,18 +29,18 @@ SecureVector<byte> EME::encode(const MemoryRegion<byte>& msg,
return pad(msg, msg.size(), key_bits, rng);
}
-/*************************************************
-* Decode a message *
-*************************************************/
+/*
+* Decode a message
+*/
SecureVector<byte> EME::decode(const byte msg[], u32bit msg_len,
u32bit key_bits) const
{
return unpad(msg, msg_len, key_bits);
}
-/*************************************************
-* Decode a message *
-*************************************************/
+/*
+* Decode a message
+*/
SecureVector<byte> EME::decode(const MemoryRegion<byte>& msg,
u32bit key_bits) const
{
diff --git a/src/pk_pad/eme.h b/src/pk_pad/eme.h
index fd759bd10..321c1d01e 100644
--- a/src/pk_pad/eme.h
+++ b/src/pk_pad/eme.h
@@ -1,7 +1,9 @@
-/*************************************************
-* EME Classes Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
+/*
+* EME Classes
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#ifndef BOTAN_PUBKEY_EME_ENCRYPTION_PAD_H__
#define BOTAN_PUBKEY_EME_ENCRYPTION_PAD_H__
@@ -11,9 +13,9 @@
namespace Botan {
-/*************************************************
-* Encoding Method for Encryption *
-*************************************************/
+/*
+* Encoding Method for Encryption
+*/
class BOTAN_DLL EME
{
public:
diff --git a/src/pk_pad/eme1/eme1.cpp b/src/pk_pad/eme1/eme1.cpp
index e5db17df6..13f68f8e4 100644
--- a/src/pk_pad/eme1/eme1.cpp
+++ b/src/pk_pad/eme1/eme1.cpp
@@ -1,7 +1,9 @@
-/*************************************************
-* EME1 Source File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
+/*
+* EME1
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#include <botan/eme1.h>
#include <botan/mgf1.h>
@@ -9,9 +11,9 @@
namespace Botan {
-/*************************************************
-* EME1 Pad Operation *
-*************************************************/
+/*
+* EME1 Pad Operation
+*/
SecureVector<byte> EME1::pad(const byte in[], u32bit in_length,
u32bit key_length,
RandomNumberGenerator& rng) const
@@ -36,9 +38,9 @@ SecureVector<byte> EME1::pad(const byte in[], u32bit in_length,
return out;
}
-/*************************************************
-* EME1 Unpad Operation *
-*************************************************/
+/*
+* EME1 Unpad Operation
+*/
SecureVector<byte> EME1::unpad(const byte in[], u32bit in_length,
u32bit key_length) const
{
@@ -77,9 +79,9 @@ SecureVector<byte> EME1::unpad(const byte in[], u32bit in_length,
throw Decoding_Error("Invalid EME1 encoding");
}
-/*************************************************
-* Return the max input size for a given key size *
-*************************************************/
+/*
+* Return the max input size for a given key size
+*/
u32bit EME1::maximum_input_size(u32bit keybits) const
{
if(keybits / 8 > 2*HASH_LENGTH + 1)
@@ -88,9 +90,9 @@ u32bit EME1::maximum_input_size(u32bit keybits) const
return 0;
}
-/*************************************************
-* EME1 Constructor *
-*************************************************/
+/*
+* EME1 Constructor
+*/
EME1::EME1(HashFunction* hash, const std::string& P) :
HASH_LENGTH(hash->OUTPUT_LENGTH)
{
diff --git a/src/pk_pad/eme1/eme1.h b/src/pk_pad/eme1/eme1.h
index a0676b7df..4df5c5f1c 100644
--- a/src/pk_pad/eme1/eme1.h
+++ b/src/pk_pad/eme1/eme1.h
@@ -1,7 +1,9 @@
-/*************************************************
-* EME1 Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
+/*
+* EME1
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#ifndef BOTAN_EME1_H__
#define BOTAN_EME1_H__
@@ -12,9 +14,9 @@
namespace Botan {
-/*************************************************
-* EME1 *
-*************************************************/
+/*
+* EME1
+*/
class BOTAN_DLL EME1 : public EME
{
public:
diff --git a/src/pk_pad/eme_pkcs/eme_pkcs.cpp b/src/pk_pad/eme_pkcs/eme_pkcs.cpp
index 494f238b4..c2f9c91d2 100644
--- a/src/pk_pad/eme_pkcs/eme_pkcs.cpp
+++ b/src/pk_pad/eme_pkcs/eme_pkcs.cpp
@@ -1,15 +1,17 @@
-/*************************************************
-* PKCS1 EME Source File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
+/*
+* PKCS1 EME
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#include <botan/eme_pkcs.h>
namespace Botan {
-/*************************************************
-* PKCS1 Pad Operation *
-*************************************************/
+/*
+* PKCS1 Pad Operation
+*/
SecureVector<byte> EME_PKCS1v15::pad(const byte in[], u32bit inlen,
u32bit olen,
RandomNumberGenerator& rng) const
@@ -32,9 +34,9 @@ SecureVector<byte> EME_PKCS1v15::pad(const byte in[], u32bit inlen,
return out;
}
-/*************************************************
-* PKCS1 Unpad Operation *
-*************************************************/
+/*
+* PKCS1 Unpad Operation
+*/
SecureVector<byte> EME_PKCS1v15::unpad(const byte in[], u32bit inlen,
u32bit key_len) const
{
@@ -54,9 +56,9 @@ SecureVector<byte> EME_PKCS1v15::unpad(const byte in[], u32bit inlen,
return SecureVector<byte>(in + seperator + 1, inlen - seperator - 1);
}
-/*************************************************
-* Return the max input size for a given key size *
-*************************************************/
+/*
+* Return the max input size for a given key size
+*/
u32bit EME_PKCS1v15::maximum_input_size(u32bit keybits) const
{
if(keybits / 8 > 10)
diff --git a/src/pk_pad/eme_pkcs/eme_pkcs.h b/src/pk_pad/eme_pkcs/eme_pkcs.h
index 76817826d..1aeedf5d7 100644
--- a/src/pk_pad/eme_pkcs/eme_pkcs.h
+++ b/src/pk_pad/eme_pkcs/eme_pkcs.h
@@ -1,7 +1,9 @@
-/*************************************************
-* EME PKCS#1 v1.5 Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
+/*
+* EME PKCS#1 v1.5
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#ifndef BOTAN_EME_PKCS1_H__
#define BOTAN_EME_PKCS1_H__
@@ -10,9 +12,9 @@
namespace Botan {
-/*************************************************
-* EME_PKCS1v15 *
-*************************************************/
+/*
+* EME_PKCS1v15
+*/
class BOTAN_DLL EME_PKCS1v15 : public EME
{
public:
diff --git a/src/pk_pad/emsa.h b/src/pk_pad/emsa.h
index 2f2b160bd..e2491e40f 100644
--- a/src/pk_pad/emsa.h
+++ b/src/pk_pad/emsa.h
@@ -1,7 +1,9 @@
-/*************************************************
-* EMSA Classes Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
+/*
+* EMSA Classes
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#ifndef BOTAN_PUBKEY_EMSA_H__
#define BOTAN_PUBKEY_EMSA_H__
@@ -11,9 +13,9 @@
namespace Botan {
-/*************************************************
-* Encoding Method for Signatures, Appendix *
-*************************************************/
+/*
+* Encoding Method for Signatures, Appendix
+*/
class BOTAN_DLL EMSA
{
public:
diff --git a/src/pk_pad/emsa1/emsa1.cpp b/src/pk_pad/emsa1/emsa1.cpp
index 12e9cca01..26d709c28 100644
--- a/src/pk_pad/emsa1/emsa1.cpp
+++ b/src/pk_pad/emsa1/emsa1.cpp
@@ -1,7 +1,9 @@
-/*************************************************
-* EMSA1 Source File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
+/*
+* EMSA1
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#include <botan/emsa1.h>
@@ -38,25 +40,25 @@ SecureVector<byte> emsa1_encoding(const MemoryRegion<byte>& msg,
}
-/*************************************************
-* EMSA1 Update Operation *
-*************************************************/
+/*
+* EMSA1 Update Operation
+*/
void EMSA1::update(const byte input[], u32bit length)
{
hash->update(input, length);
}
-/*************************************************
-* Return the raw (unencoded) data *
-*************************************************/
+/*
+* Return the raw (unencoded) data
+*/
SecureVector<byte> EMSA1::raw_data()
{
return hash->final();
}
-/*************************************************
-* EMSA1 Encode Operation *
-*************************************************/
+/*
+* EMSA1 Encode Operation
+*/
SecureVector<byte> EMSA1::encoding_of(const MemoryRegion<byte>& msg,
u32bit output_bits,
RandomNumberGenerator&)
@@ -66,9 +68,9 @@ SecureVector<byte> EMSA1::encoding_of(const MemoryRegion<byte>& msg,
return emsa1_encoding(msg, output_bits);
}
-/*************************************************
-* EMSA1 Decode/Verify Operation *
-*************************************************/
+/*
+* EMSA1 Decode/Verify Operation
+*/
bool EMSA1::verify(const MemoryRegion<byte>& coded,
const MemoryRegion<byte>& raw, u32bit key_bits) throw()
{
diff --git a/src/pk_pad/emsa1/emsa1.h b/src/pk_pad/emsa1/emsa1.h
index 64255e748..a5dac07e2 100644
--- a/src/pk_pad/emsa1/emsa1.h
+++ b/src/pk_pad/emsa1/emsa1.h
@@ -1,7 +1,9 @@
-/*************************************************
-* EMSA1 Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
+/*
+* EMSA1
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#ifndef BOTAN_EMSA1_H__
#define BOTAN_EMSA1_H__
@@ -11,9 +13,9 @@
namespace Botan {
-/*************************************************
-* EMSA1 *
-*************************************************/
+/*
+* EMSA1
+*/
class BOTAN_DLL EMSA1 : public EMSA
{
public:
diff --git a/src/pk_pad/emsa1_bsi/emsa1_bsi.cpp b/src/pk_pad/emsa1_bsi/emsa1_bsi.cpp
index cc7868a1d..212091e22 100644
--- a/src/pk_pad/emsa1_bsi/emsa1_bsi.cpp
+++ b/src/pk_pad/emsa1_bsi/emsa1_bsi.cpp
@@ -1,16 +1,18 @@
-/*************************************************
-* EMSA1 BSI Source File *
-* (C) 1999-2008 Jack Lloyd *
-* 2008 Falko Strenzke, FlexSecure GmbH *
-*************************************************/
+/*
+* EMSA1 BSI
+* (C) 1999-2008 Jack Lloyd
+* 2008 Falko Strenzke, FlexSecure GmbH
+*
+* Distributed under the terms of the Botan license
+*/
#include <botan/emsa1_bsi.h>
namespace Botan {
-/*************************************************
-* EMSA1 BSI Encode Operation *
-*************************************************/
+/*
+* EMSA1 BSI Encode Operation
+*/
SecureVector<byte> EMSA1_BSI::encoding_of(const MemoryRegion<byte>& msg,
u32bit output_bits,
RandomNumberGenerator&)
diff --git a/src/pk_pad/emsa1_bsi/emsa1_bsi.h b/src/pk_pad/emsa1_bsi/emsa1_bsi.h
index 0c0745bb0..ec86d40e2 100644
--- a/src/pk_pad/emsa1_bsi/emsa1_bsi.h
+++ b/src/pk_pad/emsa1_bsi/emsa1_bsi.h
@@ -1,8 +1,10 @@
-/*************************************************
-* EMSA1 BSI Variant Header File *
-* (C) 1999-2008 Jack Lloyd *
-* 2007 FlexSecure GmbH *
-*************************************************/
+/*
+* EMSA1 BSI Variant
+* (C) 1999-2008 Jack Lloyd
+* 2007 FlexSecure GmbH
+*
+* Distributed under the terms of the Botan license
+*/
#ifndef BOTAN_EMSA1_BSI_H__
#define BOTAN_EMSA1_BSI_H__
diff --git a/src/pk_pad/emsa2/emsa2.cpp b/src/pk_pad/emsa2/emsa2.cpp
index 5ecbf005c..168f9209e 100644
--- a/src/pk_pad/emsa2/emsa2.cpp
+++ b/src/pk_pad/emsa2/emsa2.cpp
@@ -1,7 +1,9 @@
-/*************************************************
-* EMSA2 Source File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
+/*
+* EMSA2
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#include <botan/emsa2.h>
#include <botan/hash_id.h>
@@ -10,9 +12,9 @@ namespace Botan {
namespace {
-/*************************************************
-* EMSA2 Encode Operation *
-*************************************************/
+/*
+* EMSA2 Encode Operation
+*/
SecureVector<byte> emsa2_encoding(const MemoryRegion<byte>& msg,
u32bit output_bits,
const MemoryRegion<byte>& empty_hash,
@@ -46,25 +48,25 @@ SecureVector<byte> emsa2_encoding(const MemoryRegion<byte>& msg,
}
-/*************************************************
-* EMSA2 Update Operation *
-*************************************************/
+/*
+* EMSA2 Update Operation
+*/
void EMSA2::update(const byte input[], u32bit length)
{
hash->update(input, length);
}
-/*************************************************
-* Return the raw (unencoded) data *
-*************************************************/
+/*
+* Return the raw (unencoded) data
+*/
SecureVector<byte> EMSA2::raw_data()
{
return hash->final();
}
-/*************************************************
-* EMSA2 Encode Operation *
-*************************************************/
+/*
+* EMSA2 Encode Operation
+*/
SecureVector<byte> EMSA2::encoding_of(const MemoryRegion<byte>& msg,
u32bit output_bits,
RandomNumberGenerator&)
@@ -72,9 +74,9 @@ SecureVector<byte> EMSA2::encoding_of(const MemoryRegion<byte>& msg,
return emsa2_encoding(msg, output_bits, empty_hash, hash_id);
}
-/*************************************************
-* EMSA2 Verify Operation *
-*************************************************/
+/*
+* EMSA2 Verify Operation
+*/
bool EMSA2::verify(const MemoryRegion<byte>& coded,
const MemoryRegion<byte>& raw,
u32bit key_bits) throw()
@@ -90,9 +92,9 @@ bool EMSA2::verify(const MemoryRegion<byte>& coded,
}
}
-/*************************************************
-* EMSA2 Constructor *
-*************************************************/
+/*
+* EMSA2 Constructor
+*/
EMSA2::EMSA2(HashFunction* hash_in) : hash(hash_in)
{
empty_hash = hash->final();
diff --git a/src/pk_pad/emsa2/emsa2.h b/src/pk_pad/emsa2/emsa2.h
index 367dd86ab..76888d1f6 100644
--- a/src/pk_pad/emsa2/emsa2.h
+++ b/src/pk_pad/emsa2/emsa2.h
@@ -1,7 +1,9 @@
-/*************************************************
-* EMSA2 Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
+/*
+* EMSA2
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#ifndef BOTAN_EMSA2_H__
#define BOTAN_EMSA2_H__
@@ -11,9 +13,9 @@
namespace Botan {
-/*************************************************
-* EMSA2 *
-*************************************************/
+/*
+* EMSA2
+*/
class BOTAN_DLL EMSA2 : public EMSA
{
public:
diff --git a/src/pk_pad/emsa3/emsa3.cpp b/src/pk_pad/emsa3/emsa3.cpp
index 62fdc408d..4d50abd84 100644
--- a/src/pk_pad/emsa3/emsa3.cpp
+++ b/src/pk_pad/emsa3/emsa3.cpp
@@ -1,6 +1,8 @@
/*
* EMSA3 and EMSA3_Raw
* (C) 1999-2008 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
*/
#include <botan/emsa3.h>
diff --git a/src/pk_pad/emsa3/emsa3.h b/src/pk_pad/emsa3/emsa3.h
index 443447ca3..301f2142a 100644
--- a/src/pk_pad/emsa3/emsa3.h
+++ b/src/pk_pad/emsa3/emsa3.h
@@ -1,6 +1,8 @@
/*
* EMSA3 and EMSA3_Raw
* (C) 1999-2008 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
*/
#ifndef BOTAN_EMSA3_H__
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:
diff --git a/src/pk_pad/emsa_raw/emsa_raw.cpp b/src/pk_pad/emsa_raw/emsa_raw.cpp
index c10bb4890..d5973ee55 100644
--- a/src/pk_pad/emsa_raw/emsa_raw.cpp
+++ b/src/pk_pad/emsa_raw/emsa_raw.cpp
@@ -1,23 +1,25 @@
-/*************************************************
-* EMSA-Raw Source File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
+/*
+* EMSA-Raw
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#include <botan/emsa_raw.h>
namespace Botan {
-/*************************************************
-* EMSA-Raw Encode Operation *
-*************************************************/
+/*
+* EMSA-Raw Encode Operation
+*/
void EMSA_Raw::update(const byte input[], u32bit length)
{
message.append(input, length);
}
-/*************************************************
-* Return the raw (unencoded) data *
-*************************************************/
+/*
+* Return the raw (unencoded) data
+*/
SecureVector<byte> EMSA_Raw::raw_data()
{
SecureVector<byte> buf = message;
@@ -25,9 +27,9 @@ SecureVector<byte> EMSA_Raw::raw_data()
return buf;
}
-/*************************************************
-* EMSA-Raw Encode Operation *
-*************************************************/
+/*
+* EMSA-Raw Encode Operation
+*/
SecureVector<byte> EMSA_Raw::encoding_of(const MemoryRegion<byte>& msg,
u32bit,
RandomNumberGenerator&)
@@ -35,9 +37,9 @@ SecureVector<byte> EMSA_Raw::encoding_of(const MemoryRegion<byte>& msg,
return msg;
}
-/*************************************************
-* EMSA-Raw Verify Operation *
-*************************************************/
+/*
+* EMSA-Raw Verify Operation
+*/
bool EMSA_Raw::verify(const MemoryRegion<byte>& coded,
const MemoryRegion<byte>& raw,
u32bit) throw()
diff --git a/src/pk_pad/emsa_raw/emsa_raw.h b/src/pk_pad/emsa_raw/emsa_raw.h
index df719bf27..1b0ad516e 100644
--- a/src/pk_pad/emsa_raw/emsa_raw.h
+++ b/src/pk_pad/emsa_raw/emsa_raw.h
@@ -1,7 +1,9 @@
-/*************************************************
-* EMSA-Raw Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
+/*
+* EMSA-Raw
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#ifndef BOTAN_EMSA_RAW_H__
#define BOTAN_EMSA_RAW_H__
@@ -10,9 +12,9 @@
namespace Botan {
-/*************************************************
-* EMSA-Raw *
-*************************************************/
+/*
+* EMSA-Raw
+*/
class BOTAN_DLL EMSA_Raw : public EMSA
{
private:
diff --git a/src/pk_pad/hash_id/hash_id.cpp b/src/pk_pad/hash_id/hash_id.cpp
index cfaeebf92..c83ad87ac 100644
--- a/src/pk_pad/hash_id/hash_id.cpp
+++ b/src/pk_pad/hash_id/hash_id.cpp
@@ -1,6 +1,8 @@
/*
-* Hash Function Identification Source File
+* Hash Function Identification
* (C) 1999-2008 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
*/
#include <botan/hash_id.h>
diff --git a/src/pk_pad/hash_id/hash_id.h b/src/pk_pad/hash_id/hash_id.h
index 157c45552..847d9106c 100644
--- a/src/pk_pad/hash_id/hash_id.h
+++ b/src/pk_pad/hash_id/hash_id.h
@@ -1,7 +1,9 @@
-/*************************************************
-* Hash Function Identification Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
+/*
+* Hash Function Identification
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#ifndef BOTAN_HASHID_H__
#define BOTAN_HASHID_H__
@@ -11,9 +13,9 @@
namespace Botan {
-/*************************************************
-* Return the values of various defined HashIDs *
-*************************************************/
+/*
+* Return the values of various defined HashIDs
+*/
BOTAN_DLL MemoryVector<byte> pkcs_hash_id(const std::string&);
BOTAN_DLL byte ieee1363_hash_id(const std::string&);