Creates the content for a checksum file, containing information about the size and hash-value for the supplied String argument.
The result can be "written as is" to a file.
the "raw" text for which to generate the checksum information
the checksum information as a String (formatted as content of a checksum file)
The Char used for separating fields within checksum files.
the separator char (TAB)
Returns the file extension for checksum-files.
the default file extension for checksum files (including the separating dot, eg. ".checksum.txt")
Must be called before using checksum-generation: sets/initializes the object/function for checksum generation.
After first call, following calls to this function will have no effect.
Check if the length / checksum for a raw text is the same as the checksum-information.
NOTE: The actual checksum for the raw text is only generated & checked, if the size is equal.
the (raw) text/content which should be checked
the checksum information to check against: either the
raw content (String) of a checksum file, or the parsed
contents of a checksum file, which is a PlainObject with
properties:
<pre>{ size: INTEGER, hash: STRING, info?: STRING }</pre>
<code>true</code> if the raw content matches the hash
Parses the raw text-content of a checksum file and returns an object with properties:
the raw conent of a checksum file
an object with the extracted properties from the checksum-data:
{ size: INTEGER, hash: STRING, info?: STRING }
Generated using TypeDoc
var checksumUtils = require('mmirf/checksumUtils').init();