| 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-224/pcpsha3_224_stuff.h" |
| 23 | #include "hash/sha3/sha3_stuff.h" |
| 24 | |
| 25 | /* |
| 26 | // Name: ippsHashMethodSet_SHA3_224 |
| 27 | // |
| 28 | // Purpose: Setup SHA3_224 method. |
| 29 | // |
| 30 | // Returns: Reason: |
| 31 | // ippStsNullPtrErr pMethod == NULL |
| 32 | // ippStsNoErr no errors |
| 33 | // |
| 34 | */ |
| 35 | IPPFUN(IppStatus, ippsHashMethodSet_SHA3_224, (IppsHashMethod * pMethod)) |
| 36 | { |
| 37 | /* test pointers */ |
| 38 | IPP_BAD_PTR1_RET(pMethod); |
| 39 | |
| 40 | pMethod->hashAlgId = ippHashAlg_SHA3_224; |
| 41 | pMethod->hashLen = IPP_SHA3_224_DIGEST_BITSIZE / 8, pMethod->msgBlkSize = MBS_SHA3_224; |
| 42 | pMethod->msgLenRepSize = 0; |
| 43 | pMethod->stateLen = IPP_SHA3_STATE_BYTESIZE; |
| 44 | pMethod->hashInit = cp_sha3_hashInit; |
| 45 | pMethod->hashUpdate = cp_sha3_224_hashUpdate; |
| 46 | pMethod->hashOctStr = cp_sha3_hashOctString; |
| 47 | pMethod->msgLenRep = NULL; |
| 48 | |
| 49 | return ippStsNoErr; |
| 50 | } |