https://github.com/lfaoro/auricvault
Simple Go-API used to store sensitive data using the AuricVault PCI/HIPAA compliant encryption service.
https://github.com/lfaoro/auricvault
auricvault data-security tokenization
Last synced: 8 months ago
JSON representation
Simple Go-API used to store sensitive data using the AuricVault PCI/HIPAA compliant encryption service.
- Host: GitHub
- URL: https://github.com/lfaoro/auricvault
- Owner: lfaoro
- License: mit
- Created: 2018-07-06T12:01:57.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-18T12:07:02.000Z (over 7 years ago)
- Last Synced: 2024-06-20T11:58:47.490Z (almost 2 years ago)
- Topics: auricvault, data-security, tokenization
- Language: Go
- Homepage: https://www.auricsystems.com/auricvault/
- Size: 860 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AuricVault API library
🔐 Simple Go-API useful to store sensitive data using the AuricVault PCI/HIPAA compliant encryption service.
[](LICENSE)
[](https://goreportcard.com/report/github.com/lfaoro/auricvault)
[](https://godoc.org/github.com/lfaoro/auricvault)
## Installation
```bash
$ go get -u github.com/lfaoro/auricvault
```
```go
import "github.com/lfaoro/auricvault"
```
## Quick start
```bash
# Provide a .env file in your project with the following variables or export them.
# the .env file will be automatically parsed.
$ cat > .env << EOF
AURIC_URL="https://vault01.auricsystems.com/vault/v2/"
AURIC_URL2="https://vault02.auricsystems.com/vault/v2/" # optional
AURIC_CONFIGURATION=""
AURIC_MTID=""
AURIC_MTID_SECRET=""
AURIC_SEGMENT=""
EOF
```
```go
// Instance a new Vault, choose the retention period
vault := auricvault.New(auricvault.Forever)
// If you want to see Debug information
auricvault.SetDebug()
data := "VISA,475055XXXX314032,0818"
// Encrypt using an auto-generated token
token, err := vault.Encrypt(data)
if err != nil {
log.Fatal(err)
}
fmt.Println("token: ", token)
// Encrypt using your own token
token, err := vault.Encrypt(data, "khR8pew41q0URCxtivea")
if err != nil {
log.Fatal(err)
}
fmt.Println("token: ", token)
// Retrieve the string data from the vault using the token
data, err := vault.Decrypt("khR8pew41q0URCxtivea")
if err != nil {
log.Fatal(err)
}
fmt.Println(data)
```
## Disclaimer
Some AuricVault API features and settings have been omitted in favor of simplicity. If you require any of the omitted features implemented, please open an [issue](https://github.com/lfaoro/auricvault/issues/new).
# Contibuting
> Any help and suggestions are very welcome and appreciated. Start by opening an [issue](https://github.com/lfaoro/auricvault/issues/new).
- Fork the project
- Create your feature branch `git checkout -b my-new-feature`
- Commit your changes `git commit -am 'Add my feature'`
- Push to the branch `git push origin my-new-feature`
- Create a new pull request against the master branch