Documentation ¶
Overview ¶
Package auricvault is a simple Go-API used to store sensitive data using the AuricVault PCI/HIPAA compliant encryption service.
Index ¶
- func SetDebug()
- type Params
- type Response
- type Result
- type Retention
- type Vault
- func (v *Vault) Decrypt(token string) (data string, err error)
- func (v *Vault) Delete(token string) error
- func (v *Vault) Encrypt(data, token string) (string, error)
- func (v *Vault) Info(token string) (*Result, error)
- func (v *Vault) ReEncrypt(data, token string) (string, error)
- func (v *Vault) Touch(token string) (*Result, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Params ¶
type Params struct { ConfigurationID string `json:"configurationId,omitempty"` Last4 string `json:"last4,omitempty"` Mtid string `json:"mtid,omitempty"` PlaintextValue string `json:"plaintextValue,omitempty"` Retention Retention `json:"retention,omitempty"` Segment string `json:"segment,omitempty"` UtcTimestamp string `json:"utcTimestamp,omitempty"` Token string `json:"token,omitempty"` }
type Result ¶
type Result struct { Version string `json:"version,omitempty"` LastActionSucceeded int `json:"lastActionSucceeded,omitempty"` Token string `json:"token,omitempty"` PlaintextValue string `json:"plaintextValue,omitempty"` ElapsedTime string `json:"elapsedTime,omitempty"` TokenExists string `json:"tokenExists,omitempty"` TokenCreatedDate string `json:"tokenCreatedDate,omitempty"` LastAccessedDate string `json:"lastAccessedDate,omitempty"` Segment string `json:"segment,omitempty"` Retention string `json:"retention,omitempty"` IsVaultEncrypted string `json:"isVaultEncrypted,omitempty"` }
type Vault ¶
type Vault struct {
// contains filtered or unexported fields
}
func (*Vault) Delete ¶ added in v1.2.0
Delete returns the same message for both a not-found token and a token that exists, but to which you do not have permission. This ensures the existence of the token does not leakto a third party that should not have access to the data.
func (*Vault) Encrypt ¶
Encrypt a plaintext value and store it using the passed-in token identifier. This allows you to migrate tokens you already have to the AuricVault service and maintain the same token identifier in your databases.
If no token is specified, one will be auto-generated.
func (*Vault) Info ¶ added in v1.2.0
Info retrieves information about a token. Useful for finding out if a token exists in the system without needing to retrieve the actual data.
func (*Vault) ReEncrypt ¶
ReEncrypt submit new plaintext data to be encrypted for an existing token.
func (*Vault) Touch ¶ added in v1.2.0
Touch method is similar to the TokenInfo method except that it does update the token last accessed date time stamp. This method is used to reset the start of the retention period to the current date/time.
Touching a non-existing token results in an error message and lastActionSucceeded of 0.