sha512.3 (6cec9cad762b6476313fb1f8e931a1647822db6b) | sha512.3 (7a3f5d11fb3873674a1f7e27bcc9a5f7ce279390) |
---|---|
1.\" 2.\" ---------------------------------------------------------------------------- 3.\" "THE BEER-WARE LICENSE" (Revision 42): 4.\" <phk@FreeBSD.org> wrote this file. As long as you retain this notice you 5.\" can do whatever you want with this stuff. If we meet some day, and you think 6.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp 7.\" ---------------------------------------------------------------------------- 8.\" 9.\" From: Id: mdX.3,v 1.14 1999/02/11 20:31:49 wollman Exp 10.\" $FreeBSD$ 11.\" | 1.\" 2.\" ---------------------------------------------------------------------------- 3.\" "THE BEER-WARE LICENSE" (Revision 42): 4.\" <phk@FreeBSD.org> wrote this file. As long as you retain this notice you 5.\" can do whatever you want with this stuff. If we meet some day, and you think 6.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp 7.\" ---------------------------------------------------------------------------- 8.\" 9.\" From: Id: mdX.3,v 1.14 1999/02/11 20:31:49 wollman Exp 10.\" $FreeBSD$ 11.\" |
12.Dd March 28, 2014 | 12.Dd October 17, 2015 |
13.Dt SHA512 3 14.Os 15.Sh NAME 16.Nm SHA512_Init , 17.Nm SHA512_Update , 18.Nm SHA512_Final , 19.Nm SHA512_End , 20.Nm SHA512_File , 21.Nm SHA512_FileChunk , | 13.Dt SHA512 3 14.Os 15.Sh NAME 16.Nm SHA512_Init , 17.Nm SHA512_Update , 18.Nm SHA512_Final , 19.Nm SHA512_End , 20.Nm SHA512_File , 21.Nm SHA512_FileChunk , |
22.Nm SHA512_Data 23.Nd calculate the FIPS 180-2 ``SHA-512'' message digest | 22.Nm SHA512_Data , 23.Nm SHA384_Init , 24.Nm SHA384_Update , 25.Nm SHA384_Final , 26.Nm SHA384_End , 27.Nm SHA384_File , 28.Nm SHA384_FileChunk , 29.Nm SHA384_Data 30.Nd calculate the FIPS 180-4 ``SHA-512'' family of message digests |
24.Sh LIBRARY 25.Lb libmd 26.Sh SYNOPSIS 27.In sys/types.h 28.In sha512.h 29.Ft void 30.Fn SHA512_Init "SHA512_CTX *context" 31.Ft void 32.Fn SHA512_Update "SHA512_CTX *context" "const unsigned char *data" "size_t len" 33.Ft void 34.Fn SHA512_Final "unsigned char digest[64]" "SHA512_CTX *context" 35.Ft "char *" 36.Fn SHA512_End "SHA512_CTX *context" "char *buf" 37.Ft "char *" 38.Fn SHA512_File "const char *filename" "char *buf" 39.Ft "char *" 40.Fn SHA512_FileChunk "const char *filename" "char *buf" "off_t offset" "off_t length" 41.Ft "char *" 42.Fn SHA512_Data "const unsigned char *data" "unsigned int len" "char *buf" | 31.Sh LIBRARY 32.Lb libmd 33.Sh SYNOPSIS 34.In sys/types.h 35.In sha512.h 36.Ft void 37.Fn SHA512_Init "SHA512_CTX *context" 38.Ft void 39.Fn SHA512_Update "SHA512_CTX *context" "const unsigned char *data" "size_t len" 40.Ft void 41.Fn SHA512_Final "unsigned char digest[64]" "SHA512_CTX *context" 42.Ft "char *" 43.Fn SHA512_End "SHA512_CTX *context" "char *buf" 44.Ft "char *" 45.Fn SHA512_File "const char *filename" "char *buf" 46.Ft "char *" 47.Fn SHA512_FileChunk "const char *filename" "char *buf" "off_t offset" "off_t length" 48.Ft "char *" 49.Fn SHA512_Data "const unsigned char *data" "unsigned int len" "char *buf" |
50.Ft void 51.Fn SHA384_Init "SHA384_CTX *context" 52.Ft void 53.Fn SHA384_Update "SHA384_CTX *context" "const unsigned char *data" "size_t len" 54.Ft void 55.Fn SHA384_Final "unsigned char digest[48]" "SHA384_CTX *context" 56.Ft "char *" 57.Fn SHA384_End "SHA384_CTX *context" "char *buf" 58.Ft "char *" 59.Fn SHA384_File "const char *filename" "char *buf" 60.Ft "char *" 61.Fn SHA384_FileChunk "const char *filename" "char *buf" "off_t offset" "off_t length" 62.Ft "char *" 63.Fn SHA384_Data "const unsigned char *data" "unsigned int len" "char *buf" |
|
43.Sh DESCRIPTION 44The 45.Li SHA512_ 46functions calculate a 512-bit cryptographic checksum (digest) 47for any number of input bytes. 48A cryptographic checksum is a one-way 49hash function; that is, it is computationally impractical to find 50the input corresponding to a particular output. --- 63 unchanged lines hidden (view full) --- 114is allocated with 115.Xr malloc 3 116and subsequently must be explicitly deallocated using 117.Xr free 3 118after use. 119If the 120.Fa buf 121argument is non-null it must point to at least 65 characters of buffer space. | 64.Sh DESCRIPTION 65The 66.Li SHA512_ 67functions calculate a 512-bit cryptographic checksum (digest) 68for any number of input bytes. 69A cryptographic checksum is a one-way 70hash function; that is, it is computationally impractical to find 71the input corresponding to a particular output. --- 63 unchanged lines hidden (view full) --- 135is allocated with 136.Xr malloc 3 137and subsequently must be explicitly deallocated using 138.Xr free 3 139after use. 140If the 141.Fa buf 142argument is non-null it must point to at least 65 characters of buffer space. |
143.Pp 144The 145.Li SHA384_ 146functions are identical to the 147.Li SHA512_ 148functions except they use a different initial hash value and the output is 149truncated to 384 bits. 150.Pp 151.Fn SHA384_End 152is a wrapper for 153.Fn SHA384_Final 154which converts the return value to a 49-character 155(including the terminating '\e0') 156.Tn ASCII 157string which represents the 384 bits in hexadecimal. |
|
122.Sh SEE ALSO 123.Xr md4 3 , 124.Xr md5 3 , 125.Xr ripemd 3 , 126.Xr sha 3 127.Sh HISTORY 128These functions appeared in 129.Fx 9.0 . 130.Sh AUTHORS 131The core hash routines were implemented by Colin Percival based on 132the published 133.Tn FIPS 180-2 134standard. 135.Sh BUGS 136No method is known to exist which finds two files having the same hash value, 137nor to find a file with a specific hash value. 138There is on the other hand no guarantee that such a method does not exist. | 158.Sh SEE ALSO 159.Xr md4 3 , 160.Xr md5 3 , 161.Xr ripemd 3 , 162.Xr sha 3 163.Sh HISTORY 164These functions appeared in 165.Fx 9.0 . 166.Sh AUTHORS 167The core hash routines were implemented by Colin Percival based on 168the published 169.Tn FIPS 180-2 170standard. 171.Sh BUGS 172No method is known to exist which finds two files having the same hash value, 173nor to find a file with a specific hash value. 174There is on the other hand no guarantee that such a method does not exist. |