Sha256: 760242d68ef2f9395b9289b261a830343fd4586898b0f8037a2c9955e2d8576e

Contents?: true

Size: 489 Bytes

Versions: 13

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

13 entries across 13 versions & 1 rubygems

Version Path
symmetric-encryption-4.3.1 lib/symmetric_encryption/rsa_key.rb
symmetric-encryption-4.3.0 lib/symmetric_encryption/rsa_key.rb
symmetric-encryption-4.2.1 lib/symmetric_encryption/rsa_key.rb
symmetric-encryption-4.2.0 lib/symmetric_encryption/rsa_key.rb
symmetric-encryption-4.1.4 lib/symmetric_encryption/rsa_key.rb
symmetric-encryption-4.1.3 lib/symmetric_encryption/rsa_key.rb
symmetric-encryption-4.1.2 lib/symmetric_encryption/rsa_key.rb
symmetric-encryption-4.1.1 lib/symmetric_encryption/rsa_key.rb
symmetric-encryption-4.1.0 lib/symmetric_encryption/rsa_key.rb
symmetric-encryption-4.1.0.beta1 lib/symmetric_encryption/rsa_key.rb
symmetric-encryption-4.0.1 lib/symmetric_encryption/rsa_key.rb
symmetric-encryption-4.0.0 lib/symmetric_encryption/rsa_key.rb
symmetric-encryption-4.0.0.beta3 lib/symmetric_encryption/rsa_key.rb