Documentation
¶
Index ¶
Constants ¶
View Source
const MasterKeyName = "master"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Key ¶
type Key struct {
ID uint `gorm:"primary_key" json:"-"`
Name string `sql:"not null;unique" json:"Id,omitempty"`
Key []byte `json:",omitempty"`
Nonce []byte `json:"-"`
Public []byte `json:"-"`
ReadOnly bool
// contains filtered or unexported fields
}
type Secret ¶
type Secret struct {
ID uint `gorm:"primary_key" json:"-"`
Name string `sql:"not null"`
Message []byte `json:",omitempty"`
Nonce []byte `json:"-"`
Key Key `json:",omitempty"`
Pubkey []byte `json:"-"`
KeyID uint `json:"-"`
Root bool `json:"-"`
}
func New ¶
New creates a new secret container with a unique key. Requires the master key to be unsealed.
func (*Secret) Decrypt ¶
Decrypt decrypts a secret given a shared key and a secret key provided by the user. This does not require the master key to be unsealed.
Click to show internal directories.
Click to hide internal directories.