Crate ssb_legacy_msg_data[][src]

Expand description

This crate implements the ssb legacy data format, i.e. the free-form data that forms the content of legacy messages.

Two encodings are implemented: the signing encoding, and the json transport encoding.

Modules

This module implements the json encodings of the legacy ssb data format, both signing and json transport.

Data structures for storing and manipulating arbitrary legacy data.

Structs

A wrapper around f64 to indicate that the float is compatible with the ssb legacy message data model, i.e. it is neither an infinity, nor -0.0, nor a NaN.

An iterator that yields the bytes needed to compute a hash of some legacy data.

Functions

Checks whether a given i64 is allowed for usage in ssb data (its absolute value is not larger than 2^53).

Checks whether a given u64 is allowed for usage in ssb data (it is not larger than 2^53).

Compute the length of some data. Note that this takes time linear in the length of the data, so you might want to use a WeirdEncodingIterator for computing hash and length in one go.

Create an owned representation of the weird encoding used for hash computation of legacy ssb messages. The number of bytes yielded by this iterator coincides with the length of the data.