summaryrefslogtreecommitdiff
path: root/security/nss/lib/cryptohi
diff options
context:
space:
mode:
authorcvs2hg <devnull@localhost>2003-06-13 04:43:54 +0000
committercvs2hg <devnull@localhost>2003-06-13 04:43:54 +0000
commitf5539bf59e39c7f6e8c3d3b4eccb6e0f31570bbb (patch)
tree7e42d91d7669164a4024693543e13c532ce8385c /security/nss/lib/cryptohi
parent0d6277e29895f70f6ab0c16734175be6e4560d75 (diff)
downloadnss-hg-f5539bf59e39c7f6e8c3d3b4eccb6e0f31570bbb.tar.gz
fixup commit for branch 'ANGELON_MOZ12_N8_BRANCH'ANGELON_MOZ12_N8_BASE
Diffstat (limited to 'security/nss/lib/cryptohi')
-rw-r--r--security/nss/lib/cryptohi/hasht.h15
-rw-r--r--security/nss/lib/cryptohi/sechash.c42
2 files changed, 4 insertions, 53 deletions
diff --git a/security/nss/lib/cryptohi/hasht.h b/security/nss/lib/cryptohi/hasht.h
index 852ee706e..143e37486 100644
--- a/security/nss/lib/cryptohi/hasht.h
+++ b/security/nss/lib/cryptohi/hasht.h
@@ -47,13 +47,10 @@ typedef struct HASHContextStr HASHContext;
* NOTE the order must match the definition of SECHashObjects[]!
*/
typedef enum {
- HASH_AlgNULL = 0,
- HASH_AlgMD2 = 1,
- HASH_AlgMD5 = 2,
- HASH_AlgSHA1 = 3,
- HASH_AlgSHA256 = 4,
- HASH_AlgSHA384 = 5,
- HASH_AlgSHA512 = 6,
+ HASH_AlgNULL = 0,
+ HASH_AlgMD2 = 1,
+ HASH_AlgMD5 = 2,
+ HASH_AlgSHA1 = 3,
HASH_AlgTOTAL
} HASH_HashType;
@@ -63,10 +60,6 @@ typedef enum {
#define MD2_LENGTH 16
#define MD5_LENGTH 16
#define SHA1_LENGTH 20
-#define SHA256_LENGTH 32
-#define SHA384_LENGTH 48
-#define SHA512_LENGTH 64
-#define HASH_LENGTH_MAX SHA512_LENGTH
/*
* Structure to hold hash computation info and routines
diff --git a/security/nss/lib/cryptohi/sechash.c b/security/nss/lib/cryptohi/sechash.c
index 715f840cf..36ee1efd2 100644
--- a/security/nss/lib/cryptohi/sechash.c
+++ b/security/nss/lib/cryptohi/sechash.c
@@ -87,21 +87,6 @@ sha1_NewContext(void) {
return (void *) PK11_CreateDigestContext(SEC_OID_SHA1);
}
-static void *
-sha256_NewContext(void) {
- return (void *) PK11_CreateDigestContext(SEC_OID_SHA256);
-}
-
-static void *
-sha384_NewContext(void) {
- return (void *) PK11_CreateDigestContext(SEC_OID_SHA384);
-}
-
-static void *
-sha512_NewContext(void) {
- return (void *) PK11_CreateDigestContext(SEC_OID_SHA512);
-}
-
const SECHashObject SECHashObjects[] = {
{ 0,
(void * (*)(void)) null_hash_new_context,
@@ -139,33 +124,6 @@ const SECHashObject SECHashObjects[] = {
(void (*)(void *, unsigned char *, unsigned int *, unsigned int))
PK11_DigestFinal
},
- { SHA256_LENGTH,
- (void * (*)(void)) sha256_NewContext,
- (void * (*)(void *)) PK11_CloneContext,
- (void (*)(void *, PRBool)) PK11_DestroyContext,
- (void (*)(void *)) PK11_DigestBegin,
- (void (*)(void *, const unsigned char *, unsigned int)) PK11_DigestOp,
- (void (*)(void *, unsigned char *, unsigned int *, unsigned int))
- PK11_DigestFinal
- },
- { SHA384_LENGTH,
- (void * (*)(void)) sha384_NewContext,
- (void * (*)(void *)) PK11_CloneContext,
- (void (*)(void *, PRBool)) PK11_DestroyContext,
- (void (*)(void *)) PK11_DigestBegin,
- (void (*)(void *, const unsigned char *, unsigned int)) PK11_DigestOp,
- (void (*)(void *, unsigned char *, unsigned int *, unsigned int))
- PK11_DigestFinal
- },
- { SHA512_LENGTH,
- (void * (*)(void)) sha512_NewContext,
- (void * (*)(void *)) PK11_CloneContext,
- (void (*)(void *, PRBool)) PK11_DestroyContext,
- (void (*)(void *)) PK11_DigestBegin,
- (void (*)(void *, const unsigned char *, unsigned int)) PK11_DigestOp,
- (void (*)(void *, unsigned char *, unsigned int *, unsigned int))
- PK11_DigestFinal
- },
};
const SECHashObject *