|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
Accumulates an offset-chunked authenticatorLargeBlobs write into a caller-owned buffer. More...
#include <LargeBlobStore.h>
Public Member Functions | |
| void | reset () |
| Discards any partial write and returns to the idle state. | |
| LbResult | begin (uint8_t *buffer, uint16_t capacity, uint32_t totalLength) |
| Begins a write declaring the full serialized length. | |
| LbResult | append (uint32_t offset, const uint8_t *data, uint16_t len) |
Appends one fragment at offset. | |
| bool | complete () const |
| True once the declared length has been fully received. | |
| bool | active () const |
| True while a write is in progress. | |
| uint16_t | nextOffset () const |
| Offset the next fragment must start at. | |
| const uint8_t * | data () const |
| Pointer to the accumulated buffer (valid after begin). | |
| uint16_t | length () const |
| Declared total length of the current write. | |
Accumulates an offset-chunked authenticatorLargeBlobs write into a caller-owned buffer.
Definition at line 41 of file LargeBlobStore.h.
|
inline |
True while a write is in progress.
Definition at line 67 of file LargeBlobStore.h.
| LbResult cdc::mod_fido2::LargeBlobWriteSession::append | ( | uint32_t | offset, |
| const uint8_t * | data, | ||
| uint16_t | len ) |
Appends one fragment at offset.
| offset | Byte offset of this fragment; must equal nextOffset. |
| data | Fragment bytes (may be null when len is 0). |
| len | Fragment length. |
Definition at line 44 of file LargeBlobStore.cpp.
References cdc::mod_fido2::BadLength, cdc::mod_fido2::BadSeq, data(), and cdc::mod_fido2::Ok.
| LbResult cdc::mod_fido2::LargeBlobWriteSession::begin | ( | uint8_t * | buffer, |
| uint16_t | capacity, | ||
| uint32_t | totalLength ) |
Begins a write declaring the full serialized length.
| buffer | Destination buffer owned by the caller. |
| capacity | Capacity of buffer in bytes. |
| totalLength | Declared array length, valid range 17..min(capacity,1024). |
Definition at line 28 of file LargeBlobStore.cpp.
References cdc::mod_fido2::BadLength, cdc::mod_fido2::kLargeBlobEmptyLen, cdc::mod_fido2::kLargeBlobMaxArray, cdc::mod_fido2::Ok, and cdc::mod_fido2::StorageFull.
|
inline |
True once the declared length has been fully received.
Definition at line 65 of file LargeBlobStore.h.
|
inline |
Pointer to the accumulated buffer (valid after begin).
Definition at line 71 of file LargeBlobStore.h.
Referenced by append().
|
inline |
Declared total length of the current write.
Definition at line 73 of file LargeBlobStore.h.
|
inline |
Offset the next fragment must start at.
Definition at line 69 of file LargeBlobStore.h.
| void cdc::mod_fido2::LargeBlobWriteSession::reset | ( | ) |
Discards any partial write and returns to the idle state.
Definition at line 20 of file LargeBlobStore.cpp.