https://github.com/amirhnajafiz/encrypto
Go library for encryption and decryption based on AES algorithm.
https://github.com/amirhnajafiz/encrypto
aes-256 aes-encryption encryption-decryption go golang
Last synced: 3 months ago
JSON representation
Go library for encryption and decryption based on AES algorithm.
- Host: GitHub
- URL: https://github.com/amirhnajafiz/encrypto
- Owner: amirhnajafiz
- Created: 2021-08-08T05:34:15.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-07-08T15:08:43.000Z (over 1 year ago)
- Last Synced: 2024-08-25T09:18:22.155Z (about 1 year ago)
- Topics: aes-256, aes-encryption, encryption-decryption, go, golang
- Language: Go
- Homepage:
- Size: 3.77 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Encrypto



A Golang library for encryption and decryption based on ```AES``` algorithm.
With this library you can encrypt and decrypt your texts by using a 16 bits private key.
## how to use?
Import the library in ```go.mod``` by using ```go get github.com/amirhnajafiz/encrypto```.
After that you can use it like the following example:
```go
package main
import (
"fmt"
"github.com/amirhnajafiz/encrypto"
)
func main() {
key := "0123456789abcdef" // must be of 16 bytes for this example to work
message := "Lorem ipsum dolor sit amet"
encrypted, _ := encrypto.Encrypt(key, message)
decrypted, _ := encrypto.Decrypt(key, encrypted)
fmt.Println(key, message, encrypted, decrypted)
}
```