16 0x76, 0xbe, 0x8b, 0x52, 0x8d, 0x00, 0x75, 0xf7,
17 0xaa, 0xe9, 0x8d, 0x6f, 0xa5, 0x7a, 0x6d, 0x3c,
30 if (totalLength > limit) {
38 expected_ =
static_cast<uint16_t
>(totalLength);
48 if (offset != received_) {
51 if (offset +
static_cast<uint32_t
>(len) > expected_) {
55 memcpy(buffer_ + offset,
data, len);
57 received_ =
static_cast<uint16_t
>(received_ + len);
Portable authenticatorLargeBlobs write-session accumulator and the canonical empty large-blob array c...
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.
void reset()
Discards any partial write and returns to the idle state.
const uint8_t * data() const
Pointer to the accumulated buffer (valid after begin).
constexpr uint16_t kLargeBlobEmptyLen
LbResult
Outcome of a write-session step, mapped to a CTAP status by the caller.
@ StorageFull
declared total length exceeds the buffer / kLargeBlobMaxArray
@ BadSeq
fragment offset out of order, or no active session
@ BadLength
declared total too small, or a fragment overruns the total
constexpr uint16_t kLargeBlobMaxArray
Largest serialized large-blob array, advertised as maxSerializedLargeBlobArray.
const uint8_t kLargeBlobEmpty[kLargeBlobEmptyLen]
Canonical empty large-blob array bytes.