gsasl-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS gsasl/lib/crypto


From: gsasl-commit
Subject: CVS gsasl/lib/crypto
Date: Sat, 18 Sep 2004 20:44:44 +0200

Update of /home/cvs/gsasl/lib/crypto
In directory dopio:/tmp/cvs-serv670

Modified Files:
        gc-nettle.c hmac.h 
Log Message:
Remove SHA.

--- /home/cvs/gsasl/lib/crypto/gc-nettle.c      2004/09/18 17:36:47     1.6
+++ /home/cvs/gsasl/lib/crypto/gc-nettle.c      2004/09/18 18:44:43     1.7
@@ -134,16 +134,11 @@
 #include "nettle-meta.h"
 #include "hmac.h"
 #include "md5.h"
-#include "sha.h"
 
 #if MD5_DIGEST_SIZE != GC_MD5_LEN
 # error MD5 length mismatch
 #endif
 
-#if SHA1_DIGEST_SIZE != GC_SHA1_LEN
-# error SHA1 length mismatch
-#endif
-
 #define MAX_DIGEST_SIZE 20
 
 typedef struct hash_info
@@ -175,10 +170,6 @@
       hinf->info = &nettle_md5;
       break;
 
-    case GC_SHA1:
-      hinf->info = &nettle_sha1;
-      break;
-
       /* FIXME: RMD160. */
 
     default:
@@ -283,10 +274,6 @@
       return MD5_DIGEST_SIZE;
       break;
 
-    case GC_SHA1:
-      return SHA1_DIGEST_SIZE;
-      break;
-
     case GC_RMD160:
       return /* FIXME */ 20;
       break;
@@ -360,16 +347,6 @@
       }
       break;
 
-    case GC_SHA1:
-      {
-       struct sha1_ctx sha1;
-
-       sha1_init (&sha1);
-       sha1_update (&sha1, inlen, in);
-       sha1_digest (&sha1, GC_SHA1_LEN, out);
-      }
-      break;
-
       /* FIXME: RMD160. */
 
     default:
@@ -425,28 +402,3 @@
 
   return GC_OK;
 }
-
-/**
- * gc_hmac_sha1:
- * @key: input character array with key to use.
- * @keylen: length of input character array with key to use.
- * @in: input character array of data to hash.
- * @inlen: length of input character array of data to hash.
- * @outhash: pre-allocated character array with keyed hash of data.
- *
- * Compute keyed checksum of data using HMAC-SHA1.
- *
- * Return value: Returns %GC_OK iff successful.
- **/
-int
-gc_hmac_sha1 (const char *key, size_t keylen,
-             const char *in, size_t inlen, char outhash[SHA1_DIGEST_SIZE])
-{
-  struct hmac_sha1_ctx ctx;
-
-  hmac_sha1_set_key (&ctx, keylen, key);
-  hmac_sha1_update (&ctx, inlen, in);
-  hmac_sha1_digest (&ctx, SHA1_DIGEST_SIZE, outhash);
-
-  return GC_OK;
-}
--- /home/cvs/gsasl/lib/crypto/hmac.h   2004/08/21 23:52:55     1.2
+++ /home/cvs/gsasl/lib/crypto/hmac.h   2004/09/18 18:44:43     1.3
@@ -92,34 +92,4 @@
                unsigned length, uint8_t *digest);
 
 
-/* hmac-sha1 */
-struct hmac_sha1_ctx HMAC_CTX(struct sha1_ctx);
-
-void
-hmac_sha1_set_key(struct hmac_sha1_ctx *ctx,
-                 unsigned key_length, const uint8_t *key);
-
-void
-hmac_sha1_update(struct hmac_sha1_ctx *ctx,
-                unsigned length, const uint8_t *data);
-
-void
-hmac_sha1_digest(struct hmac_sha1_ctx *ctx,
-                unsigned length, uint8_t *digest);
-
-/* hmac-sha256 */
-struct hmac_sha256_ctx HMAC_CTX(struct sha256_ctx);
-
-void
-hmac_sha256_set_key(struct hmac_sha256_ctx *ctx,
-                   unsigned key_length, const uint8_t *key);
-
-void
-hmac_sha256_update(struct hmac_sha256_ctx *ctx,
-                  unsigned length, const uint8_t *data);
-
-void
-hmac_sha256_digest(struct hmac_sha256_ctx *ctx,
-                  unsigned length, uint8_t *digest);
-
 #endif /* NETTLE_HMAC_H_INCLUDED */





reply via email to

[Prev in Thread] Current Thread [Next in Thread]