Documentation ¶
Index ¶
- func DeriveSecretKey(secret, salt []byte) ([]byte, error)
- func OpenPGPGrant(ref *reference.Ref, public string, keyring *secrets.OpenPGPSecret) ([]byte, error)
- func OpenPGPReference(grant []byte, keyring *secrets.OpenPGPSecret) (*reference.Ref, error)
- func PlaintextGrant(ref *reference.Ref) []byte
- func PlaintextReference(ciphertext []byte) *reference.Ref
- func SymmetricGrant(ref *reference.Ref, secret []byte) ([]byte, error)
- func SymmetricReference(ciphertext, secret []byte) (*reference.Ref, error)
- func Unseal(secret secrets.Manager, grt *Grant) (*reference.Ref, error)
- type Grant
- func (*Grant) Descriptor() ([]byte, []int)
- func (m *Grant) GetEncryptedReference() []byte
- func (m *Grant) GetSpec() *Spec
- func (m *Grant) GetVersion() int32
- func (*Grant) ProtoMessage()
- func (m *Grant) ProtoSize() (n int)
- func (m *Grant) Reset()
- func (m *Grant) String() string
- func (m *Grant) XXX_DiscardUnknown()
- func (m *Grant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Grant) XXX_Merge(src proto.Message)
- func (m *Grant) XXX_Size() int
- func (m *Grant) XXX_Unmarshal(b []byte) error
- type OpenPGPSpec
- func (*OpenPGPSpec) Descriptor() ([]byte, []int)
- func (m *OpenPGPSpec) GetPublicKey() string
- func (*OpenPGPSpec) ProtoMessage()
- func (m *OpenPGPSpec) ProtoSize() (n int)
- func (m *OpenPGPSpec) Reset()
- func (m *OpenPGPSpec) String() string
- func (m *OpenPGPSpec) XXX_DiscardUnknown()
- func (m *OpenPGPSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *OpenPGPSpec) XXX_Merge(src proto.Message)
- func (m *OpenPGPSpec) XXX_Size() int
- func (m *OpenPGPSpec) XXX_Unmarshal(b []byte) error
- type PlaintextSpec
- func (*PlaintextSpec) Descriptor() ([]byte, []int)
- func (*PlaintextSpec) ProtoMessage()
- func (m *PlaintextSpec) ProtoSize() (n int)
- func (m *PlaintextSpec) Reset()
- func (m *PlaintextSpec) String() string
- func (m *PlaintextSpec) XXX_DiscardUnknown()
- func (m *PlaintextSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *PlaintextSpec) XXX_Merge(src proto.Message)
- func (m *PlaintextSpec) XXX_Size() int
- func (m *PlaintextSpec) XXX_Unmarshal(b []byte) error
- type Spec
- func (*Spec) Descriptor() ([]byte, []int)
- func (m *Spec) GetOpenPGP() *OpenPGPSpec
- func (m *Spec) GetPlaintext() *PlaintextSpec
- func (m *Spec) GetSymmetric() *SymmetricSpec
- func (this *Spec) GetValue() interface{}
- func (*Spec) ProtoMessage()
- func (m *Spec) ProtoSize() (n int)
- func (m *Spec) Reset()
- func (this *Spec) SetValue(value interface{}) bool
- func (m *Spec) String() string
- func (m *Spec) XXX_DiscardUnknown()
- func (m *Spec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Spec) XXX_Merge(src proto.Message)
- func (m *Spec) XXX_Size() int
- func (m *Spec) XXX_Unmarshal(b []byte) error
- type SymmetricSpec
- func (*SymmetricSpec) Descriptor() ([]byte, []int)
- func (m *SymmetricSpec) GetPublicID() string
- func (*SymmetricSpec) ProtoMessage()
- func (m *SymmetricSpec) ProtoSize() (n int)
- func (m *SymmetricSpec) Reset()
- func (m *SymmetricSpec) String() string
- func (m *SymmetricSpec) XXX_DiscardUnknown()
- func (m *SymmetricSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *SymmetricSpec) XXX_Merge(src proto.Message)
- func (m *SymmetricSpec) XXX_Size() int
- func (m *SymmetricSpec) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeriveSecretKey ¶
func OpenPGPGrant ¶
func OpenPGPGrant(ref *reference.Ref, public string, keyring *secrets.OpenPGPSecret) ([]byte, error)
OpenPGPGrant encrypts and signs a given reference
func OpenPGPReference ¶
OpenPGPReference decrypts a given grant
func PlaintextGrant ¶
PlaintextGrant returns an encoded reference
func PlaintextReference ¶
PlaintextReference decodes the grant
func SymmetricGrant ¶
SymmetricGrant encrypts the given reference based on a secret read from the provider store
func SymmetricReference ¶
SymmetricReference decrypts the given grant based on a secret read from the provider store
Types ¶
type Grant ¶
type Grant struct { // The grantSpec provides sufficient information to decrypt the reference // if hoard has access to the requisite secret Spec *Spec `protobuf:"bytes,1,opt,name=Spec" json:"Spec,omitempty"` EncryptedReference []byte `protobuf:"bytes,2,opt,name=EncryptedReference,proto3" json:"EncryptedReference,omitempty"` Version int32 `protobuf:"varint,3,opt,name=Version,proto3" json:"Version,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Grant) Descriptor ¶
func (*Grant) GetEncryptedReference ¶
func (*Grant) GetVersion ¶
func (*Grant) ProtoMessage ¶
func (*Grant) ProtoMessage()
func (*Grant) XXX_DiscardUnknown ¶
func (m *Grant) XXX_DiscardUnknown()
func (*Grant) XXX_Marshal ¶
func (*Grant) XXX_Unmarshal ¶
type OpenPGPSpec ¶
type OpenPGPSpec struct { PublicKey string `protobuf:"bytes,1,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*OpenPGPSpec) Descriptor ¶
func (*OpenPGPSpec) Descriptor() ([]byte, []int)
func (*OpenPGPSpec) GetPublicKey ¶
func (m *OpenPGPSpec) GetPublicKey() string
func (*OpenPGPSpec) ProtoMessage ¶
func (*OpenPGPSpec) ProtoMessage()
func (*OpenPGPSpec) ProtoSize ¶
func (m *OpenPGPSpec) ProtoSize() (n int)
func (*OpenPGPSpec) Reset ¶
func (m *OpenPGPSpec) Reset()
func (*OpenPGPSpec) String ¶
func (m *OpenPGPSpec) String() string
func (*OpenPGPSpec) XXX_DiscardUnknown ¶
func (m *OpenPGPSpec) XXX_DiscardUnknown()
func (*OpenPGPSpec) XXX_Marshal ¶
func (m *OpenPGPSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*OpenPGPSpec) XXX_Merge ¶
func (dst *OpenPGPSpec) XXX_Merge(src proto.Message)
func (*OpenPGPSpec) XXX_Size ¶
func (m *OpenPGPSpec) XXX_Size() int
func (*OpenPGPSpec) XXX_Unmarshal ¶
func (m *OpenPGPSpec) XXX_Unmarshal(b []byte) error
type PlaintextSpec ¶
type PlaintextSpec struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PlaintextSpec) Descriptor ¶
func (*PlaintextSpec) Descriptor() ([]byte, []int)
func (*PlaintextSpec) ProtoMessage ¶
func (*PlaintextSpec) ProtoMessage()
func (*PlaintextSpec) ProtoSize ¶
func (m *PlaintextSpec) ProtoSize() (n int)
func (*PlaintextSpec) Reset ¶
func (m *PlaintextSpec) Reset()
func (*PlaintextSpec) String ¶
func (m *PlaintextSpec) String() string
func (*PlaintextSpec) XXX_DiscardUnknown ¶
func (m *PlaintextSpec) XXX_DiscardUnknown()
func (*PlaintextSpec) XXX_Marshal ¶
func (m *PlaintextSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PlaintextSpec) XXX_Merge ¶
func (dst *PlaintextSpec) XXX_Merge(src proto.Message)
func (*PlaintextSpec) XXX_Size ¶
func (m *PlaintextSpec) XXX_Size() int
func (*PlaintextSpec) XXX_Unmarshal ¶
func (m *PlaintextSpec) XXX_Unmarshal(b []byte) error
type Spec ¶
type Spec struct { Plaintext *PlaintextSpec `protobuf:"bytes,1,opt,name=Plaintext" json:"Plaintext,omitempty"` Symmetric *SymmetricSpec `protobuf:"bytes,2,opt,name=Symmetric" json:"Symmetric,omitempty"` OpenPGP *OpenPGPSpec `protobuf:"bytes,3,opt,name=OpenPGP" json:"OpenPGP,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Spec) Descriptor ¶
func (*Spec) GetOpenPGP ¶
func (m *Spec) GetOpenPGP() *OpenPGPSpec
func (*Spec) GetPlaintext ¶
func (m *Spec) GetPlaintext() *PlaintextSpec
func (*Spec) GetSymmetric ¶
func (m *Spec) GetSymmetric() *SymmetricSpec
func (*Spec) ProtoMessage ¶
func (*Spec) ProtoMessage()
func (*Spec) XXX_DiscardUnknown ¶
func (m *Spec) XXX_DiscardUnknown()
func (*Spec) XXX_Unmarshal ¶
type SymmetricSpec ¶
type SymmetricSpec struct { // A non-secret identifier for a secret that is 'known' to Hoard (accessible via store or config) PublicID string `protobuf:"bytes,1,opt,name=PublicID,proto3" json:"PublicID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SymmetricSpec) Descriptor ¶
func (*SymmetricSpec) Descriptor() ([]byte, []int)
func (*SymmetricSpec) GetPublicID ¶
func (m *SymmetricSpec) GetPublicID() string
func (*SymmetricSpec) ProtoMessage ¶
func (*SymmetricSpec) ProtoMessage()
func (*SymmetricSpec) ProtoSize ¶
func (m *SymmetricSpec) ProtoSize() (n int)
func (*SymmetricSpec) Reset ¶
func (m *SymmetricSpec) Reset()
func (*SymmetricSpec) String ¶
func (m *SymmetricSpec) String() string
func (*SymmetricSpec) XXX_DiscardUnknown ¶
func (m *SymmetricSpec) XXX_DiscardUnknown()
func (*SymmetricSpec) XXX_Marshal ¶
func (m *SymmetricSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SymmetricSpec) XXX_Merge ¶
func (dst *SymmetricSpec) XXX_Merge(src proto.Message)
func (*SymmetricSpec) XXX_Size ¶
func (m *SymmetricSpec) XXX_Size() int
func (*SymmetricSpec) XXX_Unmarshal ¶
func (m *SymmetricSpec) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.