aes

package
v0.0.0-...-f011ba4 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(data []byte, key []byte) ([]byte, error)

func DecryptByAesWithKey

func DecryptByAesWithKey(data string, pwd string) (string, error)

func Encrypt

func Encrypt(data []byte, key []byte) ([]byte, error)

func EncryptByAesWithKey

func EncryptByAesWithKey(data string, pwd string) (string, error)
Example
package main

import (
	"fmt"
	"github.com/Kingson4Wu/fast_proxy/common/encrypt/aes"
)

func main() {

	in := "kxw"
	actual, _ := aes.EncryptByAesWithKey(in, "ABCDABCDABCDABCD")

	fmt.Println(actual)
}
Output:

Types

This section is empty.

Jump to

Keyboard shortcuts

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