crypto::HashFunctions method readfile (public)

 <instance of crypto::HashFunctions[i]> readfile filename

Defined in

Read a file blockwisw and call the incremental crypo function on every block.

Parameters:
filename (required)

Testcases:
No testcase defined.
Source code:
set F [open $filename]
fconfigure $F -encoding binary -translation binary
while (1) {
    set block [read $F 32768]
    :add $block
    if {[string length $block] < 32768} {
    break
    }
}
close $F
#
# Return the hash sum
#
return [:get]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: