ns_md - Returns a string containing a message digest (MD)
These functions return a message digest (MD) for a message using the specified message digest algorithm. The MD code can be used to check the integrity of a piece of data (whether the data was altered) by computing a cryptographic checksum.
The provided commands provide a one-step interface and an incremental interface, where the latter one can be used to incrementally compute a message digest e.g. by reading data from a file. This is especially important for computing message digest on content which is too large to be kept in memory.
The listed commands are available in installations when NaviServer is compiled with OpenSSL support and where the NSF package is installed. The command ns_md is a generalization of ns_md5 and ns_sha1 since it provides a much larger set of cryptogrphic algorithms, output formats and provides the incremental interface.
message Data from which the digest is to be computed.
filename Path of a file containing the data from which the digest is to be computed. The file is read incrementally. args Optional paths to other files to be processed. The resulting message digest is calculated cumulatively.
Create and return a new MD object for incremental operations. The option -digest defaults to "sha256".
Add data incrementally to the MD object, which was created previously with ns_md new.
Return the current digest value from the MD object, to which data was added previously with the method add.
Delete the MD object (used for incremental operations).
nscp 2> ns_md string -digest sha256 "what do ya want for nothing?" b381e7fec653fc3ab9b178272366b8ac87fed8d31cb25ed1d0e1f3318644c89c