dashende

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package dashende

编码解码工具

Encoding and decoding tool

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64Decode

func Base64Decode(cipherstr string) (string, error)

Base64Decode @Editor robotyang at 2023

Base64Decode 将 base64字符串 解码为 明文字符串(StdEncoding)

func Base64Encode

func Base64Encode(plainstr string) string

Base64Encode @Editor robotyang at 2023

Base64Encode 将 明文字符串 编码为 base64字符串(StdEncoding)

func Base64UrlDecode

func Base64UrlDecode(cipherstr string) (string, error)

Base64UrlDecode @Editor robotyang at 2023

Base64UrlDecode 将 base64字符串 解码为 明文字符串(URLEncoding,它通常用于url和文件名中。)

@Remark URL和文件名安全方式 是 标准方式的变体,其输出 用于URL和文件名。因为 +和/字符 是标准Base64字符,但对 URL和文件名 是编码不安全的。因此 变体 会使用 -代替+, _(下划线)代替/ 。

func Base64UrlEncode

func Base64UrlEncode(plainstr string) string

Base64UrlEncode @Editor robotyang at 2023

Base64UrlEncode 将 明文字符串 编码为 base64字符串(URLEncoding,它通常用于url和文件名中。)

URL和文件名安全方式 是 标准方式的变体,其输出 用于URL和文件名。

因为 +和/字符 是标准Base64字符,但对 URL和文件名 是编码不安全的。

因此 变体 会使用 -代替+, _(下划线)代替/ 。

Types

This section is empty.

Jump to

Keyboard shortcuts

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