Package-level declarations

Types

Link copied to clipboard
object ASCII
Link copied to clipboard
object Base64
Link copied to clipboard
object Hex

Properties

Link copied to clipboard
Link copied to clipboard

Defines a property extension to easily obtain the Base64 encoded string representation of a byte array. It uses the Base64.encode(this) function to perform the encoding.

Link copied to clipboard

Defines a property extension to easily obtain the URL-safe Base64 encoded string representation of a byte array. It uses the Base64.encode(this, true) function, where the second parameter specifies that URL-safe encoding should be used.

Link copied to clipboard

Returns this number as a hexadecimal string in the format: 0xWWXXYYZZ

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Returns this number as a hexadecimal string in the format: WWXXYYZZ

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun String.fromBase64(ignoreSpaces: Boolean = false, url: Boolean = false): ByteArray

Decodes the current string from Base64 encoding and takes two optional parameters: ignore Spaces, a Boolean to ignore spaces during decoding (default is false), and url, a Boolean for URL-safe encoding (default is false.

Link copied to clipboard

Converts a Base64 encoded string to a Byte Array with options to ignore spaces before decoding and use URL-safe encoding

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun ByteArray.toBase64(url: Boolean = false, doPadding: Boolean = false): String

Encodes a byte array to a Base64 string with options for URL-safe encoding and padding.

Link copied to clipboard
Link copied to clipboard