[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdesupport/qca/plugins/qca-gcrypt
From: Brad Hards <bradh () frogmouth ! net>
Date: 2005-04-24 7:50:59
Message-ID: 20050424075059.39D4562B () office ! kde ! org
[Download RAW message or body]
CVS commit by bhards:
Add in extra HMAC support. We had SHA1, RIPEMD-160, and MD5 hashing.
This change adds SHA-224, SHA-256, SHA-384 and SHA-512. Note that
libgcrypt-1.2.1 doesn't have SHA-224, so this will break if you don't
have a more recent version. Also note that there is no more recent
version at the moment.
M +17 -2 qca-gcrypt.cpp 1.21
--- kdesupport/qca/plugins/qca-gcrypt/qca-gcrypt.cpp #1.20:1.21
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2004 Justin Karneges
- * Copyright (C) 2004 Brad Hards <bradh@frogmouth.net>
+ * Copyright (C) 2004-2005 Brad Hards <bradh@frogmouth.net>
*
* This library is free software; you can redistribute it and/or
@@ -421,4 +421,5 @@ public:
list += "md5";
list += "ripemd160";
+ list += "sha224";
list += "sha256";
list += "sha384";
@@ -426,4 +427,8 @@ public:
list += "hmac(md5)";
list += "hmac(sha1)";
+ list += "hmac(sha224)";
+ list += "hmac(sha256)";
+ list += "hmac(sha384)";
+ list += "hmac(sha512)";
list += "hmac(ripemd160)";
list += "aes128-ecb";
@@ -459,4 +464,6 @@ public:
else if ( type == "ripemd160" )
return new gcryptQCAPlugin::gcryHashContext( GCRY_MD_RMD160, this, type );
+ else if ( type == "sha224" )
+ return new gcryptQCAPlugin::gcryHashContext( GCRY_MD_SHA224, this, type );
else if ( type == "sha256" )
return new gcryptQCAPlugin::gcryHashContext( GCRY_MD_SHA256, this, type );
@@ -468,5 +475,13 @@ public:
return new gcryptQCAPlugin::gcryHMACContext( GCRY_MD_MD5, this, type );
else if ( type == "hmac(sha1)" )
- return new gcryptQCAPlugin::gcryHMACContext( GCRY_MD_SHA1,this, type );
+ return new gcryptQCAPlugin::gcryHMACContext( GCRY_MD_SHA1, this, type );
+ else if ( type == "hmac(sha224)" )
+ return new gcryptQCAPlugin::gcryHMACContext( GCRY_MD_SHA224, this, type );
+ else if ( type == "hmac(sha256)" )
+ return new gcryptQCAPlugin::gcryHMACContext( GCRY_MD_SHA256, this, type );
+ else if ( type == "hmac(sha384)" )
+ return new gcryptQCAPlugin::gcryHMACContext( GCRY_MD_SHA384, this, type );
+ else if ( type == "hmac(sha512)" )
+ return new gcryptQCAPlugin::gcryHMACContext( GCRY_MD_SHA512, this, type );
else if ( type == "hmac(ripemd160)" )
return new gcryptQCAPlugin::gcryHMACContext( GCRY_MD_RMD160, this, type );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic