base64

package
v1.172.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2026 License: Apache-2.0 Imports: 7 Imported by: 2 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

* Copyright (C) 2020-2026 Arm Limited or its affiliates and Contributors. All rights reserved. * SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeIfEncoded

func DecodeIfEncoded(ctx context.Context, s string) (decoded string)

DecodeIfEncoded will attempt to decode any string if they are base64 encoded. If not, the string will be returned as is. If the string is base64 encoded but the decoding fails, the original string will be returned.

func DecodeRecursively

func DecodeRecursively(ctx context.Context, s string) (decoded string)

DecodeRecursively will attempt to decode any string until they are no longer base64 encoded.

func DecodeString

func DecodeString(ctx context.Context, s string) (decoded string, err error)

DecodeString decodes a base64 encoded string. An error is raised if decoding fails.

func Encode

func Encode(b []byte) string

func EncodeString

func EncodeString(s string) string

func IsEncoded

func IsEncoded(s string) bool

IsEncoded checks whether a string is encoded or not.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL