sha.h revision a4c4bba9139e4fd62b07a5ece5c3f7119849d178
16a8d09569a2ebd598cef72fa605be6fb4563607vboxsync * IPRT - SHA1 digest creation
16a8d09569a2ebd598cef72fa605be6fb4563607vboxsync * Copyright (C) 2009-2010 Oracle Corporation
16a8d09569a2ebd598cef72fa605be6fb4563607vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
16a8d09569a2ebd598cef72fa605be6fb4563607vboxsync * available from http://www.virtualbox.org. This file is free software;
16a8d09569a2ebd598cef72fa605be6fb4563607vboxsync * you can redistribute it and/or modify it under the terms of the GNU
16a8d09569a2ebd598cef72fa605be6fb4563607vboxsync * General Public License (GPL) as published by the Free Software
16a8d09569a2ebd598cef72fa605be6fb4563607vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
16a8d09569a2ebd598cef72fa605be6fb4563607vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16a8d09569a2ebd598cef72fa605be6fb4563607vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16a8d09569a2ebd598cef72fa605be6fb4563607vboxsync * The contents of this file may alternatively be used under the terms
16a8d09569a2ebd598cef72fa605be6fb4563607vboxsync * of the Common Development and Distribution License Version 1.0
16a8d09569a2ebd598cef72fa605be6fb4563607vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
fa28a063d8ed660b9ae9aef07f417338b0efd8acvboxsync * VirtualBox OSE distribution, in which case the provisions of the
16a8d09569a2ebd598cef72fa605be6fb4563607vboxsync * CDDL are applicable instead of those of the GPL.
16a8d09569a2ebd598cef72fa605be6fb4563607vboxsync * You may elect to license modified versions of this file under the
16a8d09569a2ebd598cef72fa605be6fb4563607vboxsync * terms and conditions of either the GPL or the CDDL or both.
a7a0244227b5c1fb4410f6a1fa6cf7a462eaf4c1vboxsync/** @defgroup grp_rt_sha RTSha - SHA Family of Hash Functions
a7a0244227b5c1fb4410f6a1fa6cf7a462eaf4c1vboxsync * @ingroup grp_rt
a7a0244227b5c1fb4410f6a1fa6cf7a462eaf4c1vboxsync/** The size of a SHA-1 hash. */
fa28a063d8ed660b9ae9aef07f417338b0efd8acvboxsync/** The length of a SHA-1 digest string. The terminator is not included. */
a7a0244227b5c1fb4410f6a1fa6cf7a462eaf4c1vboxsync * SHA-1 context.
typedef union RTSHA1CONTEXT
#ifdef RT_SHA1_PRIVATE_CONTEXT
#ifdef RT_SHA1_PRIVATE_ALT_CONTEXT
RTDECL(int) RTSha1ToString(uint8_t const pabDigest[RTSHA1_HASH_SIZE], char *pszDigest, size_t cchDigest);
RTR3DECL(int) RTSha1Digest(void* pvBuf, size_t cbBuf, char **ppszDigest, PFNRTPROGRESS pfnProgressCallback, void *pvUser);
RTR3DECL(int) RTSha1DigestFromFile(const char *pszFile, char **ppszDigest, PFNRTPROGRESS pfnProgressCallback, void *pvUser);
typedef union RTSHA256CONTEXT
#ifdef RT_SHA256_PRIVATE_CONTEXT
RTDECL(int) RTSha256ToString(uint8_t const pabDigest[RTSHA256_HASH_SIZE], char *pszDigest, size_t cchDigest);
RTR3DECL(int) RTSha256Digest(void* pvBuf, size_t cbBuf, char **ppszDigest, PFNRTPROGRESS pfnProgressCallback, void *pvUser);
RTR3DECL(int) RTSha256DigestFromFile(const char *pszFile, char **ppszDigest, PFNRTPROGRESS pfnProgressCallback, void *pvUser);
RTDECL(int) RTSha224ToString(uint8_t const pabDigest[RTSHA224_HASH_SIZE], char *pszDigest, size_t cchDigest);
RTR3DECL(int) RTSha224Digest(void* pvBuf, size_t cbBuf, char **ppszDigest, PFNRTPROGRESS pfnProgressCallback, void *pvUser);
RTR3DECL(int) RTSha224DigestFromFile(const char *pszFile, char **ppszDigest, PFNRTPROGRESS pfnProgressCallback, void *pvUser);
typedef union RTSHA512CONTEXT
#ifdef RT_SHA512_PRIVATE_CONTEXT
RTDECL(int) RTSha512ToString(uint8_t const pabDigest[RTSHA512_HASH_SIZE], char *pszDigest, size_t cchDigest);