Skip to content

Simple Go-API used to store sensitive data using the AuricVault PCI/HIPAA compliant encryption service.

License

Notifications You must be signed in to change notification settings

lfaoro/auricvault

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AuricVault API library

🔐 Simple Go-API useful to store sensitive data using the AuricVault PCI/HIPAA compliant encryption service.

MIT License Go Report Card Go Doc

Installation

$ go get -u github.com/lfaoro/auricvault
import "github.com/lfaoro/auricvault"

Quick start

# 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
// 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.

Contibuting

Any help and suggestions are very welcome and appreciated. Start by opening an issue.

  • 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

About

Simple Go-API used to store sensitive data using the AuricVault PCI/HIPAA compliant encryption service.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages