[][src]Module ssb_json_msg::verify

Ssb legacy message verification.

The signing_encoding argument can be obtained by using the json::to_legacy_vec(&msg, true).

Functions

check_length

Check whether a length (as obtained from length(&signing_encoding)) is valid.

check_previous

Check whether the given message has the correct previous entry with respect to the hash of the previous message (or None if it is the first message of the feed).

check_sequence

Check whether the given message has the correct sequence number compared to the previous message's sequence number. If the message is the first of its feed, call this as check_sequence(&msg, 0).

check_signature

Check whether the signature signs the signing encoding by the author.

hash

Compute the hash of the given signing encoding.

hash_and_length

Compute the hash and length of the given signing encoding in one go.

length

Compute the length of the given signing encoding.