base64
Generated by tinox doc
tinox.core.base64, bundled with the compiler and also available as a standalone tinox-central package.
Encode decode text
import tinox.core.base64
class Main
{
fnc main() -> Int32
{
const encoded: String = Base64::encode("hello, tinox!")
println(encoded)
const decoded: String = Base64::decode(encoded)
println(decoded)
return 0
}
}
Encode decode bytes
import tinox.core.base64
class Main
{
fnc main() -> Int32
{
const data: List<Int64> = [0, 1, 2, 255, 128]
const encoded: String = Base64::encodeBytes(data)
println(encoded)
const decoded: List<Int64> = Base64::decodeBytes(encoded)
println("roundtrip length: " + decoded.len().toString())
return 0
}
}
fn tinoxBytesToString(bytes: List<Int64>) → String
class Base64
Methods
fn encode(data: String) → String
@Throwsfn decode(encoded: String) → String
@Throwsfn charToValue(c: String) → Int64
fn encodeBytes(data: List<Int64>) → String
@Throwsfn encodeUrlBytes(data: List<Int64>) → String
@Throwsfn decodeBytes(encoded: String) → List<Int64>
@Throwsfn urlCharToValue(c: String) → Int64
@Throwsfn decodeUrlBytes(encoded: String) → List<Int64>
@Errorclass Base64Error
* Malformed Base64 input.
Fields
message | String |