Avoid multiple lock using FIPS DRBG.
[openssl.git] / crypto / whrlpool / whrlpool.h
index 64fde8a3ad5df837ea9e40369caf6d1c3df0d5c0..9e01f5b076631ce13366c9727f08ef1b7b9a1664 100644 (file)
@@ -15,7 +15,7 @@ extern "C" {
 typedef struct {
        union   {
                unsigned char   c[WHIRLPOOL_DIGEST_LENGTH];
-               /* double q is here to ensures 64-bit alignment */
+               /* double q is here to ensure 64-bit alignment */
                double          q[WHIRLPOOL_DIGEST_LENGTH/sizeof(double)];
                }       H;
        unsigned char   data[WHIRLPOOL_BBLOCK/8];
@@ -24,10 +24,13 @@ typedef struct      {
        } WHIRLPOOL_CTX;
 
 #ifndef OPENSSL_NO_WHIRLPOOL
-void WHIRLPOOL_Init    (WHIRLPOOL_CTX *c);
-void WHIRLPOOL_Update  (WHIRLPOOL_CTX *c,const void *inp,size_t bytes);
+#ifdef OPENSSL_FIPS
+int private_WHIRLPOOL_Init(WHIRLPOOL_CTX *c);
+#endif
+int WHIRLPOOL_Init     (WHIRLPOOL_CTX *c);
+int WHIRLPOOL_Update   (WHIRLPOOL_CTX *c,const void *inp,size_t bytes);
 void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c,const void *inp,size_t bits);
-void WHIRLPOOL_Final   (unsigned char *md,WHIRLPOOL_CTX *c);
+int WHIRLPOOL_Final    (unsigned char *md,WHIRLPOOL_CTX *c);
 unsigned char *WHIRLPOOL(const void *inp,size_t bytes,unsigned char *md);
 #endif