- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::ns_crypto::HashFunctions
::ns_crypto::HashFunctions create ... \
[ -ctx ctx ] \
[ -digest (default "sha256") ]
Defined in
Class Relations
::nx::Class create ::ns_crypto::HashFunctions \ -superclass ::nx::ObjectMethods (to be applied on instances)
readfile (scripted, public)
<instance of ns_crypto::HashFunctions> readfile \ [ -encoding encoding ] filenameRead a file blockwise and call the incremental crypto function on every block.
- Switches:
- -encoding (optional, defaults to
"hex"
)- Parameters:
- filename (required)
- Testcases:
- No testcase defined.
set F [open $filename] fconfigure $F -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 -encoding $encoding]
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables