Debian Codegraph @

sources/ippcp/hash/sha3/sha3-384/pcphashmethodset_sha3_384.c

raw symbols SCIP
1 /*************************************************************************
2 * Copyright (C) 2025 Intel Corporation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *************************************************************************/
16
17 #include "owndefs.h"
18 #include "owncp.h"
19 #include "hash/pcphash.h"
20 #include "hash/pcphash_rmf.h"
21 #include "pcptool.h"
22 #include "hash/sha3/sha3-384/pcpsha3_384_stuff.h"
23
24 /*
25 // Name: ippsHashMethodSet_SHA3_384
26 //
27 // Purpose: Setup SHA3_384 method.
28 //
29 // Returns: Reason:
30 // ippStsNullPtrErr pMethod == NULL
31 // ippStsNoErr no errors
32 //
33 */
34 IPPFUN(IppStatus, ippsHashMethodSet_SHA3_384, (IppsHashMethod * pMethod))
35 {
36 /* test pointers */
37 IPP_BAD_PTR1_RET(pMethod);
38
39 pMethod->hashAlgId = ippHashAlg_SHA3_384;
40 pMethod->hashLen = IPP_SHA3_384_DIGEST_BITSIZE / 8;
41 pMethod->msgBlkSize = MBS_SHA3_384;
42 pMethod->msgLenRepSize = 0;
43 pMethod->stateLen = IPP_SHA3_STATE_BYTESIZE;
44 pMethod->hashInit = cp_sha3_hashInit;
45 pMethod->hashUpdate = cp_sha3_384_hashUpdate;
46 pMethod->hashOctStr = cp_sha3_hashOctString;
47 pMethod->msgLenRep = NULL;
48
49 return ippStsNoErr;
50 }