
louise
Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.
Dernier runRéussi#1197 · main · 10 min 35 s
1Étoiles
0Forks
0Issues
| 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" |
| 9 | pub 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" |
| 15 | pub fn decode :: text: String -> Result<Bytes, String> |