Initializing help system before first use

msgdigest

Purpose
Compute the message digest of a document.
Synopsis
function msgdigest(mdalg:string, fname:string, mdf:string):integer
function msgdigest(fname:string, mdf:string):integer
Arguments
mdalg 
Name of the algorithm to use
fname 
Name of the file to be processed
mdf 
File where to store the digest
Return value
Size of the message digest in bytes or -1 if case of error.
Example
The following procedure implements the command 'md5sum':
procedure md5sum(f:string)
 if msgdigest("md5",f,"mem:dgst")<>16 then
  writeln("Failed to compute digest")
 else
  fcopy("mem:dgst",F_BINARY,"hex:",F_TEXT)
  writeln("  ",f)
 end-if
end-procedure
Further information
1. This function computes a message digest (MD) using either the algorithm specified by the mdalg argument or the default algorithm as defined by the control parameter ssl_digest. The produced output takes the form of a binary file the size of which is returned by the function.
2. The set of supported algorithms includes "md5", "sha", and "sha256". For a full list use the command mmssl list digest.
Related topics
Module

© 2001-2022 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.