xiayuguo / aes

基于 Golang 实现 AES/CBC/PKCS7Padding 加/解密 | python 实现:https://github.com/xiayuguo/aes/tree/python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

aes

AES/CBC/PKCS7Padding 加/解密的实现

Installation

go get github.com/xiayuguo/aes

Quick Start

package main

import (
    "fmt"
    "github.com/xiayuguo/aes"
)

func main(){
    const key = "your key"
    // encrypt
    output, err := aes.AesEncrypt("body", key)
    if err != nil {
        fmt.Println("AesEncrypt's result is ", output)
    }
    // decrypt
    output, err = aes.AesDecrypt("encrypt body", key)
    if err != nil {
        fmt.Println("AesDecrypt's result is ", output)
    }
}

About

基于 Golang 实现 AES/CBC/PKCS7Padding 加/解密 | python 实现:https://github.com/xiayuguo/aes/tree/python

License:MIT License


Languages

Language:Go 100.0%