method base64.decodeUrl
URL-safe alphabet; padding is optional.
Example:
use std.crypto { base64 }
use std.ser { textOf }
fn main() io {
print(textOf(&base64.decodeUrl("aGk")!)!)
}Output
hi
pub(api) static fn decodeUrl(text: str) -> bytes | DecodeErrorComplexity. O(n).
Since. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
text | str |
Returns
bytes
Errors
DecodeError@error- `DecodeError` when the text has characters outside the URL-safe alphabet.
Effects
none declared (pure unless the body says otherwise)
Defined in: std/crypto/crypto.oxl:405