code: public static ArrayList<TagValue> DecodeSubjectPublicKeyInfo(byte[] encoding) throws CoseException
      {
          TagValue spki = DecodeCompound(0, encoding);
          if (spki.tag != 0x30) throw new CoseException("Invalid SPKI");
          ArrayList<TagValue> tvl = spki.list;
          if (tvl.size() != 2) throw new CoseException("Invalid SPKI");
          
          if (tvl.get(0).tag != 0x30) throw new CoseException("Invalid SPKI");
          if (tvl.get(0).list.isEmpty() || tvl.get(0).list.size() > 2) {
              throw new CoseException("Invalid SPKI");
          }
          if (tvl.get(0).list.get(0).tag != 6) throw new CoseException("Invalid SPKI");
          //  tvl.get(0).list.get(1).tag is an ANY so needs to be checked elsewhere
          if (tvl.get(1).tag != 3) throw new CoseException("Invalid SPKI");
          
          return tvl;
      }
docs: /*
  Decode an object which is supposed to be a SubjectPublicKeyInfo strucuture
  and check that the right set of fields are in the right place
  
  @param encoding encoded byte string to decode
  @return decoded structure
  @throws CoseException