Sha256: 1e9db43da159b6debc1f44597324f14cb5b4c6a613ef9c40c97d6622c37d9b95
Contents?: true
Size: 470 Bytes
Versions: 1
Compression:
Stored size: 470 Bytes
Contents
module Xml module Kit module Builders class Encryption attr_reader :public_key attr_reader :key, :iv, :encrypted def initialize(raw_xml, public_key) @public_key = public_key cipher = OpenSSL::Cipher.new('AES-256-CBC') cipher.encrypt @key = cipher.random_key @iv = cipher.random_iv @encrypted = cipher.update(raw_xml) + cipher.final end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
xml-kit-0.1.0 | lib/xml/kit/builders/encryption.rb |