s4:heimdal: import lorikeet-heimdal-202201172009 (commit 5a0b45cd723628b3690ea848548b...
[samba.git] / source4 / heimdal / lib / hcrypto / sha.h
index fbc1810b4aee875b55984b0d417d3695f7a1eacc..59d72408c579eec4a547f48e04d3f2769aee9bf3 100644 (file)
@@ -64,9 +64,9 @@ struct sha {
 
 typedef struct sha SHA_CTX;
 
-void SHA1_Init (struct sha *m);
-void SHA1_Update (struct sha *m, const void *v, size_t len);
-void SHA1_Final (void *res, struct sha *m);
+int SHA1_Init (struct sha *m);
+int SHA1_Update (struct sha *m, const void *v, size_t len);
+int SHA1_Final (void *res, struct sha *m);
 
 /*
  * SHA-2 256
@@ -82,9 +82,9 @@ struct hc_sha256state {
 
 typedef struct hc_sha256state SHA256_CTX;
 
-void SHA256_Init (SHA256_CTX *);
-void SHA256_Update (SHA256_CTX *, const void *, size_t);
-void SHA256_Final (void *, SHA256_CTX *);
+int SHA256_Init (SHA256_CTX *);
+int SHA256_Update (SHA256_CTX *, const void *, size_t);
+int SHA256_Final (void *, SHA256_CTX *);
 
 /*
  * SHA-2 512
@@ -100,16 +100,16 @@ struct hc_sha512state {
 
 typedef struct hc_sha512state SHA512_CTX;
 
-void SHA512_Init (SHA512_CTX *);
-void SHA512_Update (SHA512_CTX *, const void *, size_t);
-void SHA512_Final (void *, SHA512_CTX *);
+int SHA512_Init (SHA512_CTX *);
+int SHA512_Update (SHA512_CTX *, const void *, size_t);
+int SHA512_Final (void *, SHA512_CTX *);
 
 #define SHA384_DIGEST_LENGTH 48
 
 typedef struct hc_sha512state SHA384_CTX;
 
-void SHA384_Init (SHA384_CTX *);
-void SHA384_Update (SHA384_CTX *, const void *, size_t);
-void SHA384_Final (void *, SHA384_CTX *);
+int SHA384_Init (SHA384_CTX *);
+int SHA384_Update (SHA384_CTX *, const void *, size_t);
+int SHA384_Final (void *, SHA384_CTX *);
 
 #endif /* HEIM_SHA_H */