# File lib/nanite/security/encrypted_document.rb, line 18 def initialize(data, certs, cipher = 'AES-256-CBC') cipher = OpenSSL::Cipher::Cipher.new(cipher) certs = [ certs ] unless certs.respond_to?(:collect) raw_certs = certs.collect { |c| c.raw_cert } @pkcs7 = OpenSSL::PKCS7.encrypt(raw_certs, data, cipher, OpenSSL::PKCS7::BINARY) end