Function decodeBase64

  • Decodes a base64-encoded payload to a string.

    Parameters

    • payload: string

      The base64-encoded data to be decoded.

    Returns string

    The decoded payload as a UTF-8 string.

    Example

    const encodedData = 'SGVsbG8sIHdvcmxkIQ=='; // Base64-encoded data
    const decodedData = decodeBase64(encodedData);
    console.log(decodedData); // Decoded data: "Hello, world!"

Generated using TypeDoc