@@ -140,7 +140,7 @@ public CBORObject get(KeyKeys keyValue) {
140140 }
141141
142142 public CBORObject get (CBORObject keyValue ) throws CoseException {
143- if ((keyValue .getType () != CBORType .Number ) && (keyValue .getType () != CBORType .TextString )) throw new CoseException ("keyValue type is incorrect" );
143+ if ((keyValue .getType () != CBORType .Integer ) && (keyValue .getType () != CBORType .TextString )) throw new CoseException ("keyValue type is incorrect" );
144144 return keyMap .get (keyValue );
145145 }
146146
@@ -232,13 +232,13 @@ public boolean HasKeyOp(Integer that) {
232232 result = (thisObj == null );
233233 } else {
234234 result = false ;
235- if (thisObj .getType () == CBORType .Number ) {
235+ if (thisObj .getType () == CBORType .Integer ) {
236236 if (thisObj .AsInt32 () == that ) {
237237 result = true ;
238238 }
239239 } else if (thisObj .getType () == CBORType .Array ) {
240240 for (int i = 0 ; i < thisObj .size (); i ++) {
241- if ((thisObj .get (i ).getType () == CBORType .Number ) && (thisObj .get (i ).AsInt32 () == that )) {
241+ if ((thisObj .get (i ).getType () == CBORType .Integer ) && (thisObj .get (i ).AsInt32 () == that )) {
242242 result = true ;
243243 break ;
244244 }
@@ -253,7 +253,7 @@ private void CheckKeyState() throws CoseException {
253253
254254 // Must have a key type
255255 val = OneKey .this .get (KeyKeys .KeyType );
256- if ((val == null ) || (val .getType () != CBORType .Number )) throw new CoseException ("Missing or incorrect key type field" );
256+ if ((val == null ) || (val .getType () != CBORType .Integer )) throw new CoseException ("Missing or incorrect key type field" );
257257
258258 if (val .equals (KeyKeys .KeyType_Octet )) {
259259 val = OneKey .this .get (KeyKeys .Octet_K );
@@ -652,7 +652,7 @@ else if (val.equals(KeyKeys.KeyType_OKP)) {
652652
653653 for (CBORObject obj : keyMap .getKeys ()) {
654654 val = keyMap .get (obj );
655- if (obj .getType () == CBORType .Number ) {
655+ if (obj .getType () == CBORType .Integer ) {
656656 if (obj .AsInt32 () > 0 ) {
657657 newKey .add (obj , val );
658658 }
0 commit comments