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=")!)!)
}Output
hello
pub(api) static fn decode(text: str) -> bytes | DecodeErrorSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
text | str |
Returns
bytes
Errors
DecodeError@error
Effects
none declared (pure unless the body says otherwise)
Defined in: std/crypto/crypto.oxl:382