gcm-buffer

gcm-buffer — Routines to read and write LE and BE values to a data buffer.

Synopsis

guint16             gcm_buffer_read_uint16_be           (const guchar *buffer);
guint16             gcm_buffer_read_uint16_le           (const guchar *buffer);
void                gcm_buffer_write_uint16_be          (guchar *buffer,
                                                         guint16 value);
void                gcm_buffer_write_uint16_le          (guchar *buffer,
                                                         guint16 value);
guint32             gcm_buffer_read_uint32_be           (const guchar *buffer);
guint32             gcm_buffer_read_uint32_le           (const guchar *buffer);
void                gcm_buffer_write_uint32_be          (guchar *buffer,
                                                         guint32 value);
void                gcm_buffer_write_uint32_le          (guchar *buffer,
                                                         guint32 value);

Description

Functions to manipulate a raw data buffer.

Details

gcm_buffer_read_uint16_be ()

guint16             gcm_buffer_read_uint16_be           (const guchar *buffer);

Reads a big endian value from a data buffer. NOTE: No validation is done on the buffer to ensure it's valid.

buffer :

the writable data buffer

Returns :

the value to read.

Since 2.91.1


gcm_buffer_read_uint16_le ()

guint16             gcm_buffer_read_uint16_le           (const guchar *buffer);

Reads a big endian value from a data buffer. NOTE: No validation is done on the buffer to ensure it's valid.

buffer :

the writable data buffer

Returns :

the value to read.

Since 2.91.1


gcm_buffer_write_uint16_be ()

void                gcm_buffer_write_uint16_be          (guchar *buffer,
                                                         guint16 value);

Writes a big endian value into a data buffer. NOTE: No validation is done on the buffer to ensure it's big enough.

buffer :

the writable data buffer

value :

the value to write

Since 2.91.1


gcm_buffer_write_uint16_le ()

void                gcm_buffer_write_uint16_le          (guchar *buffer,
                                                         guint16 value);

Writes a little endian value into a data buffer. NOTE: No validation is done on the buffer to ensure it's big enough.

buffer :

the writable data buffer

value :

the value to write

Since 2.91.1


gcm_buffer_read_uint32_be ()

guint32             gcm_buffer_read_uint32_be           (const guchar *buffer);

Reads a big endian value from a data buffer. NOTE: No validation is done on the buffer to ensure it's valid.

buffer :

the writable data buffer

Returns :

the value to read.

Since 2.91.1


gcm_buffer_read_uint32_le ()

guint32             gcm_buffer_read_uint32_le           (const guchar *buffer);

Reads a big endian value from a data buffer. NOTE: No validation is done on the buffer to ensure it's valid.

buffer :

the writable data buffer

Returns :

the value to read.

Since 2.91.1


gcm_buffer_write_uint32_be ()

void                gcm_buffer_write_uint32_be          (guchar *buffer,
                                                         guint32 value);

Writes a big endian value into a data buffer. NOTE: No validation is done on the buffer to ensure it's big enough.

buffer :

the writable data buffer

value :

the value to write

Since 2.91.1


gcm_buffer_write_uint32_le ()

void                gcm_buffer_write_uint32_le          (guchar *buffer,
                                                         guint32 value);

Writes a little endian value into a data buffer. NOTE: No validation is done on the buffer to ensure it's big enough.

buffer :

the writable data buffer

value :

the value to write

Since 2.91.1