forked from wolfSSL/wolfssl
Update sha384 fips.
This commit is contained in:
@ -76,20 +76,32 @@
|
|||||||
#if defined(WOLFSSL_SHA384) || defined(HAVE_AESGCM)
|
#if defined(WOLFSSL_SHA384) || defined(HAVE_AESGCM)
|
||||||
int wc_InitSha384(Sha384* sha)
|
int wc_InitSha384(Sha384* sha)
|
||||||
{
|
{
|
||||||
|
if (sha == NULL) {
|
||||||
|
return BAD_FUNC_ARG;
|
||||||
|
}
|
||||||
return InitSha384_fips(sha);
|
return InitSha384_fips(sha);
|
||||||
}
|
}
|
||||||
int wc_InitSha384_ex(Sha384* sha, void* heap, int devId)
|
int wc_InitSha384_ex(Sha384* sha, void* heap, int devId)
|
||||||
{
|
{
|
||||||
(void)heap;
|
(void)heap;
|
||||||
(void)devId;
|
(void)devId;
|
||||||
|
if (sha == NULL) {
|
||||||
|
return BAD_FUNC_ARG;
|
||||||
|
}
|
||||||
return InitSha384_fips(sha);
|
return InitSha384_fips(sha);
|
||||||
}
|
}
|
||||||
int wc_Sha384Update(Sha384* sha, const byte* data, word32 len)
|
int wc_Sha384Update(Sha384* sha, const byte* data, word32 len)
|
||||||
{
|
{
|
||||||
|
if (sha == NULL || (data == NULL && len > 0)) {
|
||||||
|
return BAD_FUNC_ARG;
|
||||||
|
}
|
||||||
return Sha384Update_fips(sha, data, len);
|
return Sha384Update_fips(sha, data, len);
|
||||||
}
|
}
|
||||||
int wc_Sha384Final(Sha384* sha, byte* out)
|
int wc_Sha384Final(Sha384* sha, byte* out)
|
||||||
{
|
{
|
||||||
|
if (sha == NULL || out == NULL) {
|
||||||
|
return BAD_FUNC_ARG;
|
||||||
|
}
|
||||||
return Sha384Final_fips(sha, out);
|
return Sha384Final_fips(sha, out);
|
||||||
}
|
}
|
||||||
void wc_Sha384Free(Sha384* sha)
|
void wc_Sha384Free(Sha384* sha)
|
||||||
|
Reference in New Issue
Block a user