Encoding
base64Encode

🔠 Encodes a string to Base64 format.

Syntax

import { base64Encode } from '@opentf/std';
 
base64Encode(str: string): string

Parameters

  • str: The string to encode.

Returns

The Base64 encoded string.

Examples

base64Encode('Hello') //=> 'SGVsbG8='

Related

Try