Sha256: d2e64982902e8b0f44a2843ac7b7e9d0d2ce0867f31748d771e9a6ef53988839
Contents?: true
Size: 489 Bytes
Versions: 5
Compression:
Stored size: 489 Bytes
Contents
require "openssl" module SymmetricEncryption # DEPRECATED - Internal use only class RSAKey # DEPRECATED - Internal use only def initialize(private_rsa_key) @rsa = OpenSSL::PKey::RSA.new(private_rsa_key) end # DEPRECATED - Internal use only def encrypt(key) rsa.public_encrypt(key) end # DEPRECATED - Internal use only def decrypt(encrypted_key) rsa.private_decrypt(encrypted_key) end private attr_reader :rsa end end
Version data entries
5 entries across 5 versions & 1 rubygems