Sha256: f6e9ea7c5c5981a25dc1b6f54127ed9b528e18d449ca93029340661fcc8e64a7

Contents?: true

Size: 358 Bytes

Versions: 11

Compression:

Stored size: 358 Bytes

Contents

# frozen_string_literal: true

require "cose/key/curve_key"
require "openssl"

module COSE
  module Key
    class OKP < CurveKey
      KTY_OKP = 1

      def self.enforce_type(map)
        if map[LABEL_KTY] != KTY_OKP
          raise "Not an OKP key"
        end
      end

      def map
        super.merge(LABEL_KTY => KTY_OKP)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
cose-1.2.1 lib/cose/key/okp.rb
cose-1.2.0 lib/cose/key/okp.rb
cose-1.1.0 lib/cose/key/okp.rb
cose-1.0.0 lib/cose/key/okp.rb
cose-0.11.0 lib/cose/key/okp.rb
cose-0.10.0 lib/cose/key/okp.rb
cose-0.9.0 lib/cose/key/okp.rb
cose-0.8.0 lib/cose/key/okp.rb
cose-0.7.0 lib/cose/key/okp.rb
cose-0.6.1 lib/cose/key/okp.rb
cose-0.6.0 lib/cose/key/okp.rb