method base64.decode
Strict Base64 decoding (alphabet, padding and trailing bits are checked).
Example:
use std.crypto { base64 }
use std.ser { textOf }
fn main() io {
print(textOf(&base64.decode("aGVsbG8=")!)!)
}Вывод
hello
pub(api) static fn decode(text: str) -> bytes | DecodeErrorС версии. 1.0.0-beta
Параметры
| Имя | Тип |
|---|---|
text | str |
Возвращает
bytes
Ошибки
DecodeError@error
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/crypto/crypto.oxl:382