2 * Copyright 2016 Michael Müller
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #ifndef __BCRYPT_INTERNAL_H
21 #define __BCRYPT_INTERNAL_H
35 void sha256_init(SHA256_CTX
*ctx
) DECLSPEC_HIDDEN
;
36 void sha256_update(SHA256_CTX
*ctx
, const UCHAR
*buffer
, ULONG len
) DECLSPEC_HIDDEN
;
37 void sha256_finalize(SHA256_CTX
*ctx
, UCHAR
*buffer
) DECLSPEC_HIDDEN
;
46 void sha512_init(SHA512_CTX
*ctx
) DECLSPEC_HIDDEN
;
47 void sha512_update(SHA512_CTX
*ctx
, const UCHAR
*buffer
, ULONG len
) DECLSPEC_HIDDEN
;
48 void sha512_finalize(SHA512_CTX
*ctx
, UCHAR
*buffer
) DECLSPEC_HIDDEN
;
50 void sha384_init(SHA512_CTX
*ctx
) DECLSPEC_HIDDEN
;
51 #define sha384_update sha512_update
52 void sha384_finalize(SHA512_CTX
*ctx
, UCHAR
*buffer
) DECLSPEC_HIDDEN
;
54 /* Definitions from advapi32 */
60 unsigned char digest
[16];
63 VOID WINAPI
MD5Init(MD5_CTX
*ctx
);
64 VOID WINAPI
MD5Update(MD5_CTX
*ctx
, const unsigned char *buf
, unsigned int len
);
65 VOID WINAPI
MD5Final(MD5_CTX
*ctx
);
75 VOID WINAPI
A_SHAInit(SHA_CTX
*ctx
);
76 VOID WINAPI
A_SHAUpdate(SHA_CTX
*ctx
, const UCHAR
*buffer
, UINT size
);
77 VOID WINAPI
A_SHAFinal(SHA_CTX
*ctx
, PULONG result
);
79 #endif /* __BCRYPT_INTERNAL_H */