xref: /isa-l_crypto/mh_sha256/mh_sha256_base_aliases.c (revision f6da0bf48af4a49143c2bd4ecaa976ae453273d6)
1dc44e3c3SJerry Yu /**********************************************************************
2dc44e3c3SJerry Yu   Copyright(c) 2019 Arm Corporation All rights reserved.
3dc44e3c3SJerry Yu 
4dc44e3c3SJerry Yu   Redistribution and use in source and binary forms, with or without
5dc44e3c3SJerry Yu   modification, are permitted provided that the following conditions
6dc44e3c3SJerry Yu   are met:
7dc44e3c3SJerry Yu     * Redistributions of source code must retain the above copyright
8dc44e3c3SJerry Yu       notice, this list of conditions and the following disclaimer.
9dc44e3c3SJerry Yu     * Redistributions in binary form must reproduce the above copyright
10dc44e3c3SJerry Yu       notice, this list of conditions and the following disclaimer in
11dc44e3c3SJerry Yu       the documentation and/or other materials provided with the
12dc44e3c3SJerry Yu       distribution.
13dc44e3c3SJerry Yu     * Neither the name of Arm Corporation nor the names of its
14dc44e3c3SJerry Yu       contributors may be used to endorse or promote products derived
15dc44e3c3SJerry Yu       from this software without specific prior written permission.
16dc44e3c3SJerry Yu 
17dc44e3c3SJerry Yu   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18dc44e3c3SJerry Yu   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19dc44e3c3SJerry Yu   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20dc44e3c3SJerry Yu   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21dc44e3c3SJerry Yu   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22dc44e3c3SJerry Yu   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23dc44e3c3SJerry Yu   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24dc44e3c3SJerry Yu   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25dc44e3c3SJerry Yu   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26dc44e3c3SJerry Yu   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27dc44e3c3SJerry Yu   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28dc44e3c3SJerry Yu **********************************************************************/
29dc44e3c3SJerry Yu #include "mh_sha256_internal.h"
30dc44e3c3SJerry Yu #include <string.h>
3138e16e11SMarcel Cornu int
_mh_sha256_update(struct isal_mh_sha256_ctx * ctx,const void * buffer,uint32_t len)32*f6da0bf4SMarcel Cornu _mh_sha256_update(struct isal_mh_sha256_ctx *ctx, const void *buffer, uint32_t len)
33dc44e3c3SJerry Yu {
34dc44e3c3SJerry Yu         return mh_sha256_update_base(ctx, buffer, len);
35dc44e3c3SJerry Yu }
36dc44e3c3SJerry Yu 
3738e16e11SMarcel Cornu int
_mh_sha256_finalize(struct isal_mh_sha256_ctx * ctx,void * mh_sha256_digest)38*f6da0bf4SMarcel Cornu _mh_sha256_finalize(struct isal_mh_sha256_ctx *ctx, void *mh_sha256_digest)
39dc44e3c3SJerry Yu {
40dc44e3c3SJerry Yu         return mh_sha256_finalize_base(ctx, mh_sha256_digest);
41dc44e3c3SJerry Yu }
42