
MessageDigestTest |
util.MessageDigestTest |
MessageDigestTest.java
The purpose of this actor is calculate the message digest for the contents
of a file. The MD5 algorithm is used and the result is compared to a
previously saved value. This provides a test of whether the contents of the
file has changed.
input is a file name; output is a boolean
Author(s): Dan Higgins NCEAS UC Santa Barbara
Version:
testFileName
The name of the file to be tested
testResult
The result of the test (true or false)
MD5_MessageDigest
A MD5 value to test against (in string format)
learningMode
if the learningMode parameter is true, the calculated MD5 value is just placed
in the MD5_MessageDigest field as a hex string and no comparison is made; a false
is alway returned for this case (to indicate actor is in learning mode).
If true, a comparison is made; result of comparison is sent to the testResult
output port