Sha256: 38761164765377c428ae948ab70292786d4308e27b40ae5e49730515e9d146b0

Contents?: true

Size: 815 Bytes

Versions: 4

Compression:

Stored size: 815 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

4 entries across 4 versions & 1 rubygems

Version Path
xmlenc-0.2.1 lib/xmlenc/builder/complex_types/encrypted_type.rb
xmlenc-0.2.0 lib/xmlenc/builder/complex_types/encrypted_type.rb
xmlenc-0.1.7 lib/xmlenc/builder/complex_types/encrypted_type.rb
xmlenc-0.1.6 lib/xmlenc/builder/complex_types/encrypted_type.rb