Skip to main content
Log in

Mojo function

b64encode

b64encode(input_bytes: Span[SIMD[uint8, 1], origin], mut result: List[SIMD[uint8, 1], hint_trivial_type])

Performs base64 encoding on the input string.

Notes: This method reserves the necessary buffer capacity. result can be a 0 capacity buffer.

Args:

  • input_bytes (Span[SIMD[uint8, 1], origin]): The input string buffer.
  • result (List[SIMD[uint8, 1], hint_trivial_type]): The buffer in which to store the values.

b64encode(input_string: StringSlice[origin]) -> String

Performs base64 encoding on the input string.

Args:

  • input_string (StringSlice[origin]): The input string buffer.

Returns:

The ASCII base64 encoded string.

b64encode(input_bytes: Span[SIMD[uint8, 1], origin]) -> String

Performs base64 encoding on the input string.

Args:

  • input_bytes (Span[SIMD[uint8, 1], origin]): The input string buffer.

Returns:

The ASCII base64 encoded string.