public static DataItem cborToDataItem()

in java/cose/CborUtil.java [51:62]


  public static DataItem cborToDataItem(byte[] data) {
    ByteArrayInputStream bais = new ByteArrayInputStream(data);
    try {
      List<DataItem> dataItems = new CborDecoder(bais).decode();
      if (dataItems.size() != 1) {
        throw new VerifyException("Expected 1 item, found " + dataItems.size());
      }
      return dataItems.get(0);
    } catch (CborException e) {
      throw new VerifyException("Error decoding data", e);
    }
  }