lib/cose/key/base.rb in cose-0.3.0 vs lib/cose/key/base.rb in cose-0.4.0

- old
+ new

@@ -3,17 +3,15 @@ require "cbor" module COSE module Key class Base - KTY_LABEL = 1 - - def self.from_cbor(cbor) + def self.deserialize(cbor) from_map(CBOR.decode(cbor)) end def self.enforce_type(map, kty, error_message) - if map[KTY_LABEL] != kty + if map[LABEL_KTY] != kty raise error_message end end end end