tobogganSe connecter

louise

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

15 lignes · 626 octetsBrut · Historique
1/// Base64 (RFC 4648): the alphabet with `+` and `/`, `=` padding.
2/// PostgreSQL's SCRAM-SHA-256 exchange is base64'd (issue #145).
3///
4/// base64.encode(bytes.from_string("hi")) // "aGk="
5/// base64.decode("aGk=") // Ok("hi"'s bytes)
6
7/// `data` in base64, with `=` padding.
8@extern c "tl_base64_encode"
9pub fn encode :: data: Bytes -> String
10
11/// The bytes of a base64 text: its length a multiple of 4, no whitespace,
12/// `=` padding only as the last one or two characters. (The pad bits are
13/// not checked.)
14@extern c "tl_base64_decode"
15pub fn decode :: text: String -> Result<Bytes, String>