aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash/sha2
diff options
context:
space:
mode:
authorlloyd <lloyd@randombit.net>2009-10-28 22:55:12 +0000
committerlloyd <lloyd@randombit.net>2009-10-28 22:55:12 +0000
commit3623be3fd05d890309cc3da4b3a1e319e357df65 (patch)
tree34ca43fcf8a7007cc01a3919f63e9ab6763cb673 /src/hash/sha2
parentfc1e61500e77fcabe67e6d2607810c1ba071bbdd (diff)
parent9462f875b13a321f42a127166d49670ca04afcde (diff)
propagate from branch 'net.randombit.botan.1_8' (head 3158f8272a3582dd44dfb771665eb71f7d005339)
to branch 'net.randombit.botan' (head bf629b13dd132b263e76a72b7eca0f7e4ab19aac)
Diffstat (limited to 'src/hash/sha2')
-rw-r--r--src/hash/sha2/info.txt9
-rw-r--r--src/hash/sha2/sha2_32.cpp8
-rw-r--r--src/hash/sha2/sha2_32.h6
-rw-r--r--src/hash/sha2/sha2_64.cpp6
-rw-r--r--src/hash/sha2/sha2_64.h6
5 files changed, 13 insertions, 22 deletions
diff --git a/src/hash/sha2/info.txt b/src/hash/sha2/info.txt
index 9b92ff385..8cc50fa41 100644
--- a/src/hash/sha2/info.txt
+++ b/src/hash/sha2/info.txt
@@ -2,15 +2,6 @@ realname "SHA-2 (224, 256, 384, 512)"
define SHA2
-load_on auto
-
-<add>
-sha2_32.cpp
-sha2_32.h
-sha2_64.cpp
-sha2_64.h
-</add>
-
<requires>
mdx_hash
</requires>
diff --git a/src/hash/sha2/sha2_32.cpp b/src/hash/sha2/sha2_32.cpp
index 9da2ec23f..2a63eef25 100644
--- a/src/hash/sha2/sha2_32.cpp
+++ b/src/hash/sha2/sha2_32.cpp
@@ -62,7 +62,7 @@ void SHA_224_256_BASE::compress_n(const byte input[], u32bit blocks)
for(u32bit j = 16; j != 64; ++j)
W[j] = sigma(W[j- 2], 17, 19, 10) + W[j- 7] +
- sigma(W[j-15], 7, 18, 3) + W[j-16];
+ sigma(W[j-15], 7, 18, 3) + W[j-16];
F1(A, B, C, D, E, F, G, H, W[ 0], 0x428A2F98);
F1(H, A, B, C, D, E, F, G, W[ 1], 0x71374491);
@@ -152,7 +152,7 @@ void SHA_224_256_BASE::copy_out(byte output[])
/*
* Clear memory of sensitive data
*/
-void SHA_224_256_BASE::clear() throw()
+void SHA_224_256_BASE::clear()
{
MDx_HashFunction::clear();
W.clear();
@@ -161,7 +161,7 @@ void SHA_224_256_BASE::clear() throw()
/*
* Clear memory of sensitive data
*/
-void SHA_224::clear() throw()
+void SHA_224::clear()
{
SHA_224_256_BASE::clear();
digest[0] = 0xc1059ed8;
@@ -177,7 +177,7 @@ void SHA_224::clear() throw()
/*
* Clear memory of sensitive data
*/
-void SHA_256::clear() throw()
+void SHA_256::clear()
{
SHA_224_256_BASE::clear();
digest[0] = 0x6A09E667;
diff --git a/src/hash/sha2/sha2_32.h b/src/hash/sha2/sha2_32.h
index 05083d19d..313eec676 100644
--- a/src/hash/sha2/sha2_32.h
+++ b/src/hash/sha2/sha2_32.h
@@ -19,7 +19,7 @@ namespace Botan {
class BOTAN_DLL SHA_224_256_BASE : public MDx_HashFunction
{
protected:
- void clear() throw();
+ void clear();
SHA_224_256_BASE(u32bit out) :
MDx_HashFunction(out, 64, true, true) { clear(); }
@@ -36,7 +36,7 @@ class BOTAN_DLL SHA_224_256_BASE : public MDx_HashFunction
class BOTAN_DLL SHA_224 : public SHA_224_256_BASE
{
public:
- void clear() throw();
+ void clear();
std::string name() const { return "SHA-224"; }
HashFunction* clone() const { return new SHA_224; }
SHA_224() : SHA_224_256_BASE(28) { clear(); }
@@ -48,7 +48,7 @@ class BOTAN_DLL SHA_224 : public SHA_224_256_BASE
class BOTAN_DLL SHA_256 : public SHA_224_256_BASE
{
public:
- void clear() throw();
+ void clear();
std::string name() const { return "SHA-256"; }
HashFunction* clone() const { return new SHA_256; }
SHA_256() : SHA_224_256_BASE(32) { clear (); }
diff --git a/src/hash/sha2/sha2_64.cpp b/src/hash/sha2/sha2_64.cpp
index e9b4c2e5a..3c771eb44 100644
--- a/src/hash/sha2/sha2_64.cpp
+++ b/src/hash/sha2/sha2_64.cpp
@@ -167,7 +167,7 @@ void SHA_384_512_BASE::copy_out(byte output[])
/*
* Clear memory of sensitive data
*/
-void SHA_384_512_BASE::clear() throw()
+void SHA_384_512_BASE::clear()
{
MDx_HashFunction::clear();
W.clear();
@@ -176,7 +176,7 @@ void SHA_384_512_BASE::clear() throw()
/*
* Clear memory of sensitive data
*/
-void SHA_384::clear() throw()
+void SHA_384::clear()
{
SHA_384_512_BASE::clear();
digest[0] = 0xCBBB9D5DC1059ED8;
@@ -192,7 +192,7 @@ void SHA_384::clear() throw()
/*
* Clear memory of sensitive data
*/
-void SHA_512::clear() throw()
+void SHA_512::clear()
{
SHA_384_512_BASE::clear();
digest[0] = 0x6A09E667F3BCC908;
diff --git a/src/hash/sha2/sha2_64.h b/src/hash/sha2/sha2_64.h
index dcc6dc83b..8e4d171f8 100644
--- a/src/hash/sha2/sha2_64.h
+++ b/src/hash/sha2/sha2_64.h
@@ -18,7 +18,7 @@ namespace Botan {
class BOTAN_DLL SHA_384_512_BASE : public MDx_HashFunction
{
protected:
- void clear() throw();
+ void clear();
SHA_384_512_BASE(u32bit out) :
MDx_HashFunction(out, 128, true, true, 16) {}
@@ -37,7 +37,7 @@ class BOTAN_DLL SHA_384_512_BASE : public MDx_HashFunction
class BOTAN_DLL SHA_384 : public SHA_384_512_BASE
{
public:
- void clear() throw();
+ void clear();
std::string name() const { return "SHA-384"; }
HashFunction* clone() const { return new SHA_384; }
SHA_384() : SHA_384_512_BASE(48) { clear(); }
@@ -49,7 +49,7 @@ class BOTAN_DLL SHA_384 : public SHA_384_512_BASE
class BOTAN_DLL SHA_512 : public SHA_384_512_BASE
{
public:
- void clear() throw();
+ void clear();
std::string name() const { return "SHA-512"; }
HashFunction* clone() const { return new SHA_512; }
SHA_512() : SHA_384_512_BASE(64) { clear(); }