Sha256: a1a3ca261bd3b067cb9bb568ad5409394ee7e6530d71595e9a230a269a7c0757

Contents?: true

Size: 803 Bytes

Versions: 5

Compression:

Stored size: 803 Bytes

Contents

module Xmlenc
  module Builder
    module ComplexTypes
      module EncryptedType
        extend ActiveSupport::Concern
        include Xmlenc::Builder::Base

        included do
          register_namespace "xenc", Xmlenc::NAMESPACES[:xenc]

          has_one :encryption_method, Xmlenc::Builder::EncryptionMethod, xpath: "./"
          has_one :key_info, Xmlenc::Builder::KeyInfo, xpath: "./"
          has_one :cipher_data, Xmlenc::Builder::CipherData, xpath: "./"

          validates :cipher_data, presence: true
        end

        def initialize(attributes = {})
          super
          self.cipher_data = CipherData.new
        end

        def set_encryption_method(attributes = {})
          self.encryption_method = EncryptionMethod.new(attributes)
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
xmlenc-0.1.5 lib/xmlenc/builder/complex_types/encrypted_type.rb
xmlenc-0.1.4 lib/xmlenc/builder/complex_types/encrypted_type.rb
xmlenc-0.1.3 lib/xmlenc/builder/complex_types/encrypted_type.rb
xmlenc-0.1.2 lib/xmlenc/builder/complex_types/encrypted_type.rb
xmlenc-0.1.1 lib/xmlenc/builder/complex_types/encrypted_type.rb