Sha256: 3af24e4772b8a450651b176e7ac6bd98124f90893d27f06f6cdb819293ca6ed9

Contents?: true

Size: 490 Bytes

Versions: 8

Compression:

Stored size: 490 Bytes

Contents

require "cose/security_message"
require "cose/recipient"

module COSE
  class Encrypt < SecurityMessage
    attr_reader :ciphertext, :recipients

    def self.keyword_arguments_for_initialize(decoded)
      { ciphertext: decoded[0], recipients: decoded[1].map { |s| COSE::Recipient.deserialize(s) } }
    end

    def initialize(ciphertext:, recipients:, **keyword_arguments)
      super(**keyword_arguments)

      @ciphertext = ciphertext
      @recipients = recipients
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
cose-0.8.0 lib/cose/encrypt.rb
cose-0.7.0 lib/cose/encrypt.rb
cose-0.6.1 lib/cose/encrypt.rb
cose-0.6.0 lib/cose/encrypt.rb
cose-0.5.0 lib/cose/encrypt.rb
cose-0.4.1 lib/cose/encrypt.rb
cose-0.4.0 lib/cose/encrypt.rb
cose-0.3.0 lib/cose/encrypt.rb