Class ::ns_hmac (public)
::nx::Class ::ns_hmac
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_hmac {} ::ns_hmac public object method file {{-digest sha256} {-encoding hex} key filename args} { set m [:new -digest $digest -key $key] 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_hmac public object method string {{-digest sha256} {-encoding hex} key message} { ::ns_crypto::hmac string -digest $digest -encoding $encoding $key $message } ::ns_hmac public method add message { ::ns_crypto::hmac add ${:ctx} $message } ::ns_hmac public method destroy {} { if {[info exists :ctx]} { ::ns_crypto::hmac free ${:ctx} } next } ::ns_hmac public method get {{-encoding hex}} { ::ns_crypto::hmac get -encoding $encoding ${:ctx} } ::ns_hmac protected method init {} { set :ctx [::ns_crypto::hmac new ${:digest} ${:key}] } ::nsf::relation::set ::ns_hmac superclass ::ns_crypto::HashFunctions ::nx::slotObj -container slot ::ns_hmac ::nsf::object::alloc ::nx::VariableSlot ::ns_hmac::slot::key {set :accessor none set :configurable true set :convert false set :defaultmethods {} set :disposition alias set :domain ::ns_hmac set :incremental 0 set :manager ::ns_hmac::slot::key set :methodname key set :multiplicity 1..1 set :name key set :per-object false set :position 0 set :required 1 set :trace none : init}XQL Not present: Generic, PostgreSQL, Oracle
![[i]](/resources/acs-subsite/ZoomIn16.gif)