1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-18 02:19:39 +00:00

libmd: export and document *Fd/*FdChunk interfaces

PR:		280784 (exp-run)
Fixes: de13c2427d ("libmd: introduce functions that operate on an fd")
Reviewed by:	manpages (bcr), fuz
Differential Revision:	https://reviews.freebsd.org/D34502
This commit is contained in:
Kyle Evans 2022-03-08 11:42:52 -06:00
parent 01112a1711
commit fd3ced1507
7 changed files with 160 additions and 6 deletions

View File

@ -6,7 +6,7 @@
.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
.\" ----------------------------------------------------------------------------
.\"
.Dd May 21, 2019
.Dd March 8, 2022
.Dt MDX 3
.Os
.Sh NAME
@ -15,6 +15,8 @@
.Nm MDXPad ,
.Nm MDXFinal ,
.Nm MDXEnd ,
.Nm MDXFd ,
.Nm MDXFdChunk ,
.Nm MDXFile ,
.Nm MDXFileChunk ,
.Nm MDXData
@ -35,6 +37,10 @@
.Ft "char *"
.Fn MDXEnd "MDX_CTX *context" "char *buf"
.Ft "char *"
.Fn MDXFd "int fd" "char *buf"
.Ft "char *"
.Fn MDXFdChunk "int fd" "char *buf" "off_t offset" "off_t length"
.Ft "char *"
.Fn MDXFile "const char *filename" "char *buf"
.Ft "char *"
.Fn MDXFileChunk "const char *filename" "char *buf" "off_t offset" "off_t length"
@ -125,6 +131,19 @@ function calculates the digest of a chunk of data in memory, and uses
.Fn MDXEnd
to return the result.
.Pp
The
.Fn MDXFd
and
.Fn MDXFdChunk
functions are identical to their
.Fn MDXFile
and
.Fn MDXFileChunk
counterparts, with the exception that the first argument is an
.Fa fd
instead of a
.Fa filename .
.Pp
When using
.Fn MDXEnd ,
.Fn MDXFile ,

View File

@ -130,6 +130,10 @@ __weak_reference(_libmd_MDXEnd, MDXEnd);
__weak_reference(_libmd_MDXFile, MDXFile);
#undef MDXFileChunk
__weak_reference(_libmd_MDXFileChunk, MDXFileChunk);
#undef MDXFd
__weak_reference(_libmd_MDXFd, MDXFd);
#undef MDXFdChunk
__weak_reference(_libmd_MDXFdChunk, MDXFdChunk);
#undef MDXData
__weak_reference(_libmd_MDXData, MDXData);
#endif

View File

@ -8,7 +8,7 @@
.\"
.\" From: Id: mdX.3,v 1.14 1999/02/11 20:31:49 wollman Exp
.\"
.Dd July 20, 2018
.Dd March 8, 2022
.Dt RIPEMD 3
.Os
.Sh NAME
@ -16,6 +16,8 @@
.Nm RIPEMD160_Update ,
.Nm RIPEMD160_Final ,
.Nm RIPEMD160_End ,
.Nm RIPEMD160_Fd ,
.Nm RIPEMD160_FdChunk ,
.Nm RIPEMD160_File ,
.Nm RIPEMD160_FileChunk ,
.Nm RIPEMD160_Data
@ -34,6 +36,10 @@
.Ft "char *"
.Fn RIPEMD160_End "RIPEMD160_CTX *context" "char *buf"
.Ft "char *"
.Fn RIPEMD160_Fd "int fd" "char *buf"
.Ft "char *"
.Fn RIPEMD160_FdChunk "int fd" "char *buf" "off_t offset" "off_t length"
.Ft "char *"
.Fn RIPEMD160_File "const char *filename" "char *buf"
.Ft "char *"
.Fn RIPEMD160_FileChunk "const char *filename" "char *buf" "off_t offset" "off_t length"
@ -106,6 +112,19 @@ function calculates the digest of a chunk of data in memory, and uses
.Fn RIPEMD160_End
to return the result.
.Pp
The
.Fn RIPEMD160_Fd
and
.Fn RIPEMD160_FdChunk
functions are identical to their
.Fn RIPEMD160_File
and
.Fn RIPEMD160_FileChunk
counterparts, with the exception that the first argument is an
.Fa fd
instead of a
.Fa filename .
.Pp
When using
.Fn RIPEMD160_End ,
.Fn RIPEMD160_File ,

View File

@ -8,7 +8,7 @@
.\"
.\" From: Id: mdX.3,v 1.14 1999/02/11 20:31:49 wollman Exp
.\"
.Dd February 6, 2023
.Dd February 12, 2023
.Dt SHA 3
.Os
.Sh NAME
@ -16,6 +16,8 @@
.Nm SHA_Update ,
.Nm SHA_Final ,
.Nm SHA_End ,
.Nm SHA_Fd ,
.Nm SHA_FdChunk ,
.Nm SHA_File ,
.Nm SHA_FileChunk ,
.Nm SHA_Data ,
@ -23,6 +25,8 @@
.Nm SHA1_Update ,
.Nm SHA1_Final ,
.Nm SHA1_End ,
.Nm SHA1_Fd ,
.Nm SHA1_FdChunk ,
.Nm SHA1_File ,
.Nm SHA1_FileChunk ,
.Nm SHA1_Data
@ -41,6 +45,10 @@
.Ft "char *"
.Fn SHA_End "SHA_CTX *context" "char *buf"
.Ft "char *"
.Fn SHA_Fd "int fd" "char *buf"
.Ft "char *"
.Fn SHA_FdChunk "int fd" "char *buf" "off_t offset" "off_t length"
.Ft "char *"
.Fn SHA_File "const char *filename" "char *buf"
.Ft "char *"
.Fn SHA_FileChunk "const char *filename" "char *buf" "off_t offset" "off_t length"
@ -55,6 +63,10 @@
.Ft "char *"
.Fn SHA1_End "SHA_CTX *context" "char *buf"
.Ft "char *"
.Fn SHA1_Fd "int fd" "char *buf"
.Ft "char *"
.Fn SHA1_FdChunk "int fd" "char *buf" "off_t offset" "off_t length"
.Ft "char *"
.Fn SHA1_File "const char *filename" "char *buf"
.Ft "char *"
.Fn SHA1_FileChunk "const char *filename" "char *buf" "off_t offset" "off_t length"
@ -130,6 +142,19 @@ calculates the digest of a chunk of data in memory, and uses
.Fn SHA1_End
to return the result.
.Pp
The
.Fn SHA1_Fd
and
.Fn SHA1_FdChunk
functions are identical to their
.Fn SHA1_File
and
.Fn SHA1_FileChunk
counterparts, with the exception that the first argument is an
.Fa fd
instead of a
.Fa filename .
.Pp
When using
.Fn SHA1_End ,
.Fn SHA1_File ,

View File

@ -8,7 +8,7 @@
.\"
.\" From: Id: mdX.3,v 1.14 1999/02/11 20:31:49 wollman Exp
.\"
.Dd July 20, 2018
.Dd March 8, 2022
.Dt SHA256 3
.Os
.Sh NAME
@ -16,6 +16,8 @@
.Nm SHA224_Update ,
.Nm SHA224_Final ,
.Nm SHA224_End ,
.Nm SHA224_Fd ,
.Nm SHA224_FdChunk ,
.Nm SHA224_File ,
.Nm SHA224_FileChunk ,
.Nm SHA224_Data ,
@ -23,6 +25,8 @@
.Nm SHA256_Update ,
.Nm SHA256_Final ,
.Nm SHA256_End ,
.Nm SHA256_Fd ,
.Nm SHA256_FdChunk ,
.Nm SHA256_File ,
.Nm SHA256_FileChunk ,
.Nm SHA256_Data
@ -41,6 +45,10 @@
.Ft "char *"
.Fn SHA224_End "SHA224_CTX *context" "char *buf"
.Ft "char *"
.Fn SHA224_Fd "int fd" "char *buf"
.Ft "char *"
.Fn SHA224_FdChunk "int fd" "char *buf" "off_t offset" "off_t length"
.Ft "char *"
.Fn SHA224_File "const char *filename" "char *buf"
.Ft "char *"
.Fn SHA224_FileChunk "const char *filename" "char *buf" "off_t offset" "off_t length"
@ -56,6 +64,10 @@
.Ft "char *"
.Fn SHA256_End "SHA256_CTX *context" "char *buf"
.Ft "char *"
.Fn SHA256_Fd "int fd" "char *buf"
.Ft "char *"
.Fn SHA256_FdChunk "int fd" "char *buf" "off_t offset" "off_t length"
.Ft "char *"
.Fn SHA256_File "const char *filename" "char *buf"
.Ft "char *"
.Fn SHA256_FileChunk "const char *filename" "char *buf" "off_t offset" "off_t length"
@ -125,6 +137,19 @@ calculates the digest of a chunk of data in memory, and uses
.Fn SHA256_End
to return the result.
.Pp
The
.Fn SHA256_Fd
and
.Fn SHA256_FdChunk
functions are identical to their
.Fn SHA256_File
and
.Fn SHA256_FileChunk
counterparts, with the exception that the first argument is an
.Fa fd
instead of a
.Fa filename .
.Pp
When using
.Fn SHA256_End ,
.Fn SHA256_File ,

View File

@ -8,7 +8,7 @@
.\"
.\" From: Id: mdX.3,v 1.14 1999/02/11 20:31:49 wollman Exp
.\"
.Dd February 3, 2023
.Dd February 12, 2023
.Dt SHA512 3
.Os
.Sh NAME
@ -16,6 +16,8 @@
.Nm SHA512_Update ,
.Nm SHA512_Final ,
.Nm SHA512_End ,
.Nm SHA512_Fd ,
.Nm SHA512_FdChunk ,
.Nm SHA512_File ,
.Nm SHA512_FileChunk ,
.Nm SHA512_Data ,
@ -23,6 +25,8 @@
.Nm SHA384_Update ,
.Nm SHA384_Final ,
.Nm SHA384_End ,
.Nm SHA384_Fd ,
.Nm SHA384_FdChunk ,
.Nm SHA384_File ,
.Nm SHA384_FileChunk ,
.Nm SHA384_Data ,
@ -37,6 +41,8 @@
.Nm SHA512_256_Update ,
.Nm SHA512_256_Final ,
.Nm SHA512_256_End ,
.Nm SHA512_256_Fd ,
.Nm SHA512_256_FdChunk ,
.Nm SHA512_256_File ,
.Nm SHA512_256_FileChunk ,
.Nm SHA512_256_Data
@ -55,6 +61,10 @@
.Ft "char *"
.Fn SHA512_End "SHA512_CTX *context" "char *buf"
.Ft "char *"
.Fn SHA512_Fd "int fd" "char *buf"
.Ft "char *"
.Fn SHA512_FdChunk "int fd" "char *buf" "off_t offset" "off_t length"
.Ft "char *"
.Fn SHA512_File "const char *filename" "char *buf"
.Ft "char *"
.Fn SHA512_FileChunk "const char *filename" "char *buf" "off_t offset" "off_t length"
@ -70,6 +80,10 @@
.Ft "char *"
.Fn SHA384_End "SHA384_CTX *context" "char *buf"
.Ft "char *"
.Fn SHA384_Fd "int fd" "char *buf"
.Ft "char *"
.Fn SHA384_FdChunk "int fd" "char *buf" "off_t offset" "off_t length"
.Ft "char *"
.Fn SHA384_File "const char *filename" "char *buf"
.Ft "char *"
.Fn SHA384_FileChunk "const char *filename" "char *buf" "off_t offset" "off_t length"
@ -99,6 +113,10 @@
.Ft "char *"
.Fn SHA512_256_End "SHA512_CTX *context" "char *buf"
.Ft "char *"
.Fn SHA512_256_Fd "int fd" "char *buf"
.Ft "char *"
.Fn SHA512_256_FdChunk "int fd" "char *buf" "off_t offset" "off_t length"
.Ft "char *"
.Fn SHA512_256_File "const char *filename" "char *buf"
.Ft "char *"
.Fn SHA512_256_FileChunk "const char *filename" "char *buf" "off_t offset" "off_t length"
@ -168,6 +186,19 @@ calculates the digest of a chunk of data in memory, and uses
.Fn SHA512_End
to return the result.
.Pp
The
.Fn SHA512_Fd
and
.Fn SHA512_FdChunk
functions are identical to their
.Fn SHA512_File
and
.Fn SHA512_FileChunk
counterparts, with the exception that the first argument is an
.Fa fd
instead of a
.Fa filename .
.Pp
When using
.Fn SHA512_End ,
.Fn SHA512_File ,

View File

@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd May 21, 2019
.Dd March 8, 2022
.Dt SKEIN 3
.Os
.Sh NAME
@ -31,6 +31,8 @@
.Nm SKEIN256_Update ,
.Nm SKEIN256_Final ,
.Nm SKEIN256_End ,
.Nm SKEIN256_Fd ,
.Nm SKEIN256_FdChunk ,
.Nm SKEIN256_File ,
.Nm SKEIN256_FileChunk ,
.Nm SKEIN256_Data ,
@ -38,6 +40,8 @@
.Nm SKEIN512_Update ,
.Nm SKEIN512_Final ,
.Nm SKEIN512_End ,
.Nm SKEIN512_Fd ,
.Nm SKEIN512_FdChunk ,
.Nm SKEIN512_File ,
.Nm SKEIN512_FileChunk ,
.Nm SKEIN512_Data ,
@ -45,6 +49,8 @@
.Nm SKEIN1024_Update ,
.Nm SKEIN1024_Final ,
.Nm SKEIN1024_End ,
.Nm SKEIN1024_Fd ,
.Nm SKEIN1024_FdChunk ,
.Nm SKEIN1024_File ,
.Nm SKEIN1024_FileChunk ,
.Nm SKEIN1024_Data
@ -63,6 +69,10 @@
.Ft "char *"
.Fn SKEIN256_End "SKEIN256_CTX *context" "char *buf"
.Ft "char *"
.Fn SKEIN256_Fd "int fd" "char *buf"
.Ft "char *"
.Fn SKEIN256_FdChunk "int fd" "char *buf" "off_t offset" "off_t length"
.Ft "char *"
.Fn SKEIN256_File "const char *filename" "char *buf"
.Ft "char *"
.Fn SKEIN256_FileChunk "const char *filename" "char *buf" "off_t offset" "off_t length"
@ -77,6 +87,10 @@
.Ft "char *"
.Fn SKEIN512_End "SKEIN512_CTX *context" "char *buf"
.Ft "char *"
.Fn SKEIN512_Fd "int fd" "char *buf"
.Ft "char *"
.Fn SKEIN512_FdChunk "int fd" "char *buf" "off_t offset" "off_t length"
.Ft "char *"
.Fn SKEIN512_File "const char *filename" "char *buf"
.Ft "char *"
.Fn SKEIN512_FileChunk "const char *filename" "char *buf" "off_t offset" "off_t length"
@ -91,6 +105,10 @@
.Ft "char *"
.Fn SKEIN1024_End "SKEIN1024_CTX *context" "char *buf"
.Ft "char *"
.Fn SKEIN1024_Fd "int fd" "char *buf"
.Ft "char *"
.Fn SKEIN1024_FdChunk "int fd" "char *buf" "off_t offset" "off_t length"
.Ft "char *"
.Fn SKEIN1024_File "const char *filename" "char *buf"
.Ft "char *"
.Fn SKEIN1024_FileChunk "const char *filename" "char *buf" "off_t offset" "off_t length"
@ -160,6 +178,19 @@ calculates the digest of a chunk of data in memory, and uses
.Fn SKEIN256_End
to return the result.
.Pp
The
.Fn SKEIN256_Fd
and
.Fn SKEIN256_FdChunk
functions are identical to their
.Fn SKEIN256_File
and
.Fn SKEIN256_FileChunk
counterparts, with the exception that the first argument is an
.Fa fd
instead of a
.Fa filename .
.Pp
When using
.Fn SKEIN256_End ,
.Fn SKEIN256_File ,