Sha256: 2ea2aac998b2997f5840276f2eec630c34a9c2cdf221bc44d911f732830bbc77
Contents?: true
Size: 474 Bytes
Versions: 17
Compression:
Stored size: 474 Bytes
Contents
module Saml module Kit module Builders class XmlEncryption 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
17 entries across 17 versions & 1 rubygems