]>
git.saurik.com Git - apple/security.git/blob - SecurityTests/cspxutils/hashTimeLibCrypt/pbkdDigest.h
2 * Copyright (c) 2003-2005 Apple Computer, Inc. All Rights Reserved.
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please
7 * obtain a copy of the License at http://www.apple.com/publicsource and
8 * read it before using this file.
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
12 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
13 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
14 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
15 * Please see the License for the specific language governing rights and
16 * limitations under the License.
19 * pbkdDigest.h - SHA1/MD5 digest object
22 #ifndef _PBKD_DIGEST_H_
23 #define _PBKD_DIGEST_H_
25 #include <Security/cssmtype.h>
26 #include <openssl/md5.h>
27 #include <openssl/sha.h>
33 #define kSHA1DigestSize SHA_DIGEST_LENGTH
34 #define kSHA1BlockSize SHA_CBLOCK
36 #define kMD5DigestSize MD5_DIGEST_LENGTH
37 #define kMD5BlockSize MD5_CBLOCK
39 typedef int (*DigestInitFcn
)(void *ctx
);
40 typedef int (*DigestUpdateFcn
)(void *ctx
, const void *data
, unsigned long len
);
41 typedef int (*DigestFinalFcn
)(void *md
, void *c
);
43 /* callouts to libcrypt */
46 DigestUpdateFcn update
;
59 /* Ops on a DigestCtx */
77 #endif /* _PBKD_DIGEST_H_ */