Method: NSS.decrypt
- Defined in:
- lib/nss.rb
.decrypt(b64str) ⇒ Object
102 103 104 105 106 107 108 109 110 111 |
# File 'lib/nss.rb', line 102 def self.decrypt(b64str) base64_decode(b64str) do |str_item| with_sec_item do |res_item| res = NSSFFI.pk11sdr_decrypt(str_item, res_item, nil) raise NSS::Error, "cannot decrypt string" unless res == :success res_item.string() end end end |