COSEEncrypt.deserialize constructor

COSEEncrypt.deserialize(
  1. CborIterableObject<Iterable> cbor
)

Implementation

factory COSEEncrypt.deserialize(CborIterableObject cbor) {
  return COSEEncrypt(
    headers: COSEHeaders(
      protected: COSEProtectedHeaderMap.deserialize(
        cbor.elementAt<CborBytesValue>(0),
      ),
      unprotected: COSEHeaderMap.deserialize(cbor.elementAt<CborMapValue>(1)),
    ),
    ciphertext: cbor.elementAtBytes<List<int>?>(2),
    recipients: COSERecipients.deserialize(cbor.elementAt<CborListValue>(3)),
    serializationConfig: COSESerializationConfig(encoding: cbor.encoding),
  );
}