Sha256: 3e5d162525cf1ca1cfca0c1ad49b4a0b7a91f469a465b1a47756a4a1de40617c
Contents?: true
Size: 404 Bytes
Versions: 16
Compression:
Stored size: 404 Bytes
Contents
# frozen_string_literal: true require 'openssl' test_path = File.expand_path('../../test/rubygems', __FILE__) private_key_path = "#{test_path}/private_key.pem" key = OpenSSL::PKey::RSA.new File.read private_key_path cipher = OpenSSL::Cipher.new 'DES-CBC' encrypted_key_path = "#{test_path}/encrypted_private_key.pem" open encrypted_key_path, 'w' do |io| io.write key.to_pem cipher, 'Foo bar' end
Version data entries
16 entries across 16 versions & 1 rubygems