class DTK::Client::SecurityUtil
Public Class Methods
encrypt(public_key_string, attribute_value)
click to toggle source
# File lib/client/util/security_util.rb, line 23 def self.encrypt(public_key_string, attribute_value) key = OpenSSL::PKey::RSA.new(::Base64.decode64(public_key_string)) encrypted = key.public_encrypt(attribute_value) encoded = ::Base64.encode64(encrypted) end