Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 2 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 (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-07-08T15:08:43.000Z (6 months ago)
- Last Synced: 2024-08-25T09:18:22.155Z (5 months 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
![](https://img.shields.io/badge/Language-Golang-blue)
![](https://img.shields.io/badge/Tests-Pass-green)
![GitHub release (with filter)](https://img.shields.io/github/v/release/amirhnajafiz/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 mainimport (
"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)
}
```