Debian Codegraph @

sources/ippcp/hash/md5/pcphashmethodset_md5.c

raw symbols SCIP
1 /*************************************************************************
2 * Copyright (C) 2002 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 /*
18 //
19 // Purpose:
20 // Cryptography Primitive.
21 // Digesting message according to MD5
22 // (derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm)
23 //
24 // Equivalent code is available from RFC 1321.
25 //
26 // Contents:
27 // ippsHashMethodSet_MD5()
28 //
29 */
30
31 #include "owndefs.h"
32 #include "owncp.h"
33 #include "hash/pcphash.h"
34 #include "hash/pcphash_rmf.h"
35 #include "pcptool.h"
36 #include "hash/md5/pcpmd5stuff.h"
37
38 /*F*
39 // Name: ippsHashMethodSet_MD5
40 //
41 // Purpose: Setup MD5 method.
42 //
43 // Returns: Reason:
44 // ippStsNullPtrErr pMethod == NULL
45 // ippStsNoErr no errors
46 //
47 *F*/
48 IPPFUN(IppStatus, ippsHashMethodSet_MD5, (IppsHashMethod * pMethod))
49 {
50 /* test pointers */
51 IPP_BAD_PTR1_RET(pMethod);
52
53 pMethod->hashAlgId = ippHashAlg_MD5;
54 pMethod->hashLen = IPP_MD5_DIGEST_BITSIZE / 8;
55 pMethod->msgBlkSize = MBS_MD5;
56 pMethod->msgLenRepSize = MLR_MD5;
57 pMethod->stateLen = IPP_MD5_STATE_BYTESIZE;
58 pMethod->hashInit = md5_hashInit;
59 pMethod->hashUpdate = md5_hashUpdate;
60 pMethod->hashOctStr = md5_hashOctString;
61 pMethod->msgLenRep = md5_msgRep;
62
63 return ippStsNoErr;
64 }