Class ::ns_md (public)
::nx::Class ::ns_md
Defined in /usr/local/ns/lib/nsf2.5.0/lib/nx-traits.tcl
- Testcases:
- No testcase defined.
Source code: ::nsf::object::alloc ::nx::Class ::ns_md {} ::ns_md public object method file {{-digest sha256} {-encoding hex} filename args} { set m [:new -digest $digest] set r "" foreach path [concat [list $filename] $args] { if {![file readable $path]} { $m destroy return -code error "file $path is not readable" } set r [$m readfile -encoding $encoding $path] } $m destroy return $r } ::ns_md public object method string {{-digest sha256} {-encoding hex} message} { ::ns_crypto::md string -digest $digest -encoding $encoding $message } ::ns_md public method add message { ::ns_crypto::md add ${:ctx} $message } ::ns_md public method destroy {} { if {[info exists :ctx]} { ::ns_crypto::md free ${:ctx} } next } ::ns_md public method get {{-encoding hex}} { ::ns_crypto::md get -encoding $encoding ${:ctx} } ::ns_md protected method init {} { set :ctx [::ns_crypto::md new ${:digest}] } ::nsf::relation::set ::ns_md superclass ::ns_crypto::HashFunctionsXQL Not present: Generic, PostgreSQL, Oracle
![[i]](/resources/acs-subsite/ZoomIn16.gif)