Documentation ¶
Index ¶
- type PublicParamsLoader
- type PublicParamsManager
- func (v *PublicParamsManager) Fetch() ([]byte, error)
- func (v *PublicParamsManager) Load() error
- func (v *PublicParamsManager) NewCertifierKeyPair() ([]byte, []byte, error)
- func (v *PublicParamsManager) PublicParameters() driver.PublicParameters
- func (v *PublicParamsManager) PublicParams() *crypto.PublicParams
- func (v *PublicParamsManager) SerializePublicParameters() ([]byte, error)
- func (v *PublicParamsManager) SetPublicParameters(raw []byte) error
- func (v *PublicParamsManager) Validate() error
- type Vault
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PublicParamsLoader ¶
type PublicParamsLoader interface { // Fetch fetches the public parameters from the backend Fetch() ([]byte, error) // FetchParams fetches the public parameters from the backend and unmarshal them FetchParams() (*crypto.PublicParams, error) }
type PublicParamsManager ¶
type PublicParamsManager struct { PP *crypto.PublicParams PublicParamsLoader PublicParamsLoader // the vault Vault Vault // label of the public params PPLabel string Mutex sync.RWMutex }
func NewFromParams ¶
func NewFromParams(pp *crypto.PublicParams) (*PublicParamsManager, error)
func NewPublicParamsManager ¶ added in v0.2.0
func NewPublicParamsManager(PPLabel string, vault Vault, publicParamsLoader PublicParamsLoader) *PublicParamsManager
func (*PublicParamsManager) Fetch ¶
func (v *PublicParamsManager) Fetch() ([]byte, error)
func (*PublicParamsManager) Load ¶ added in v0.2.0
func (v *PublicParamsManager) Load() error
func (*PublicParamsManager) NewCertifierKeyPair ¶
func (v *PublicParamsManager) NewCertifierKeyPair() ([]byte, []byte, error)
func (*PublicParamsManager) PublicParameters ¶
func (v *PublicParamsManager) PublicParameters() driver.PublicParameters
func (*PublicParamsManager) PublicParams ¶
func (v *PublicParamsManager) PublicParams() *crypto.PublicParams
func (*PublicParamsManager) SerializePublicParameters ¶
func (v *PublicParamsManager) SerializePublicParameters() ([]byte, error)
SerializePublicParameters returns the public params in a serialized form
func (*PublicParamsManager) SetPublicParameters ¶ added in v0.2.0
func (v *PublicParamsManager) SetPublicParameters(raw []byte) error
SetPublicParameters updates the public parameters with the passed value
func (*PublicParamsManager) Validate ¶
func (v *PublicParamsManager) Validate() error
Validate validates the public parameters
Click to show internal directories.
Click to hide internal directories.