Class ::crypto::HashFunctions

::crypto::HashFunctions[i] create ... \
           [ -ctx ctx ] \
           [ -digest (default "sha256") ]

Defined in

Class Relations

  • class: ::nx::Class[i]
  • superclass: ::nx::Object[i]
::nx::Class create ::crypto::HashFunctions \
     -superclass ::nx::Object

Methods (to be applied on instances)

  • readfile (scripted, public)

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

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

    Parameters:
    filename (required)

    Testcases:
    No testcase defined.
    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]