Class ::ns_crypto::HashFunctions

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

Class Relations

  • class: ::nx::Class[i]
  • superclass: ::nx::Object[i]
  • subclass: ::ns_hmac[i], ::ns_md[i]
::nx::Class create ::ns_crypto::HashFunctions \
     -superclass ::nx::Object

Methods (to be applied on instances)

  • readfile (scripted)

    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 -encoding $encoding]