#lang scribble/manual @require[(planet cce/scheme:4:1/planet)] @require[(for-label openssl/sha1)] @require[(for-label (this-package-in main))] @title{SHA-2} @author{@(author+email "Jan Dvorak" "mordae@anilinux.org")} SHA-2 family of functions modelled after the @racket[openssl/sha1] module. @defmodule/this-package[] @defproc[(sha224-bytes (in input-port?)) bytes?]{ Returns 28-byte string that represents SHA-2 224-bit variant hash of the content from @racket[in], consuming all of the input from @racket[in] until an end-of-file. } @defproc[(sha256-bytes (in input-port?)) bytes?]{ Returns 32-byte string that represents SHA-2 256-bit variant hash of the content from @racket[in], consuming all of the input from @racket[in] until an end-of-file. } @defproc[(sha512-bytes (in input-port?)) bytes?]{ Returns 64-byte string that represents SHA-2 512-bit variant hash of the content from @racket[in], consuming all of the input from @racket[in] until an end-of-file. } @defproc[(sha224 (in input-port?)) string?]{ Returns a 56-character string that represents SHA-2 224-bit variant hash (in hexadecimal notation) of the content from @racket[in], consuming all of the input from @racket[in] until an end-of-file. } @defproc[(sha256 (in input-port?)) string?]{ Returns a 64-character string that represents SHA-2 256-bit variant hash (in hexadecimal notation) of the content from @racket[in], consuming all of the input from @racket[in] until an end-of-file. } @defproc[(sha512 (in input-port?)) string?]{ Returns a 128-character string that represents SHA-2 512-bit variant hash (in hexadecimal notation) of the content from @racket[in], consuming all of the input from @racket[in] until an end-of-file. } @defproc[(bytes->sha224 (bstr bytes?)) string?]{ Returns a 56-character string that represents SHA-2 224-bit variant hash (in hexadecimal notation) of the given byte string @racket[bstr]. } @defproc[(bytes->sha256 (bstr bytes?)) string?]{ Returns a 64-character string that represents SHA-2 256-bit variant hash (in hexadecimal notation) of the given byte string @racket[bstr]. } @defproc[(bytes->sha512 (bstr bytes?)) string?]{ Returns a 128-character string that represents SHA-2 512-bit variant hash (in hexadecimal notation) of the given byte string @racket[bstr]. } @defproc[(string->sha224/utf-8 (str string?)) string?]{ Returns a 56-character string that represents SHA-2 224-bit variant hash (in hexadecimal notation) of the given string @racket[str] as if it were an UTF-8 encoded byte string. } @defproc[(string->sha256/utf-8 (str string?)) string?]{ Returns a 64-character string that represents SHA-2 256-bit variant hash (in hexadecimal notation) of the given string @racket[str] as if it were an UTF-8 encoded byte string. } @defproc[(string->sha512/utf-8 (str string?)) string?]{ Returns a 128-character string that represents SHA-2 512-bit variant hash (in hexadecimal notation) of the given string @racket[str] as if it were an UTF-8 encoded byte string. } @; vim:set ft=scribble sw=2 ts=2 et: