class Bytes

Defined at line 23 of file ../../src/security/lib/fcrypto/bytes.h

Public Methods

const uint8_t * get ()

Accessors

Defined at line 32 of file ../../src/security/lib/fcrypto/bytes.h

uint8_t * get ()

Defined at line 33 of file ../../src/security/lib/fcrypto/bytes.h

size_t len ()

Defined at line 34 of file ../../src/security/lib/fcrypto/bytes.h

void Bytes ()

Public methods

Defined at line 36 of file ../../src/security/lib/fcrypto/bytes.cc

void ~Bytes ()

Defined at line 37 of file ../../src/security/lib/fcrypto/bytes.cc

zx_status_t Randomize ()

Resizes the underlying buffer to |len| bytes and fills it with random data.

Defined at line 37 of file ../../src/security/lib/fcrypto/bytes.h

void Bytes (Bytes && )

Defined at line 39 of file ../../src/security/lib/fcrypto/bytes.cc

Bytes & operator= (Bytes && )

Defined at line 44 of file ../../src/security/lib/fcrypto/bytes.cc

zx_status_t Copy (const Bytes & src, zx_off_t dst_off)

Defined at line 47 of file ../../src/security/lib/fcrypto/bytes.h

zx_status_t Randomize (size_t len)

Defined at line 52 of file ../../src/security/lib/fcrypto/bytes.cc

bool operator!= (const Bytes & other)

Defined at line 60 of file ../../src/security/lib/fcrypto/bytes.h

zx_status_t Resize (size_t size, uint8_t fill)

Resize the underlying buffer. If the new length is shorter, the data is truncated. If it is

longer, it is padded with the given |fill| value.

Defined at line 61 of file ../../src/security/lib/fcrypto/bytes.cc

zx_status_t Copy (const void * src, size_t len, zx_off_t dst_off)

Copies |len| bytes from |src| to |dst_off| in the underlying buffer. Resizes the buffer as

needed, padding with zeros.

Defined at line 95 of file ../../src/security/lib/fcrypto/bytes.cc

void Clear ()

Erases and frees the underlying buffer.

Defined at line 119 of file ../../src/security/lib/fcrypto/bytes.cc

const uint8_t & operator[] (zx_off_t off)

Array access operators. Assert that |off| is not out of bounds.

Defined at line 127 of file ../../src/security/lib/fcrypto/bytes.cc

uint8_t & operator[] (zx_off_t off)

Defined at line 132 of file ../../src/security/lib/fcrypto/bytes.cc

bool operator== (const Bytes & other)

Comparison operators. These are guaranteed to be constant-time.

Defined at line 137 of file ../../src/security/lib/fcrypto/bytes.cc