Documentation ¶
Index ¶
- type PasswordContainer256
- func (c *PasswordContainer256) GetSignature() string
- func (c *PasswordContainer256) HasSignature() bool
- func (c *PasswordContainer256) SetSignature(signature string) bool
- func (c *PasswordContainer256) SetSignatureByBytes(data []byte) bool
- func (c *PasswordContainer256) SetSignatureByFunc(h func() hash.Hash) bool
- type PasswordContainer512
- func (c *PasswordContainer512) GetSignature() string
- func (c *PasswordContainer512) HasSignature() bool
- func (c *PasswordContainer512) SetSignature(signature string) bool
- func (c *PasswordContainer512) SetSignatureByBytes(data []byte) bool
- func (c *PasswordContainer512) SetSignatureByFunc(h func() hash.Hash) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PasswordContainer256 ¶
type PasswordContainer256 struct { Header string `json:"header"` Hash256 string `json:"hash256"` Signature string `json:"signature"` }
func (*PasswordContainer256) GetSignature ¶
func (c *PasswordContainer256) GetSignature() string
GetSignature returns the signature field of this password container.
func (*PasswordContainer256) HasSignature ¶
func (c *PasswordContainer256) HasSignature() bool
HasSignature returns true if and only if this password container has a valid signature field.
func (*PasswordContainer256) SetSignature ¶
func (c *PasswordContainer256) SetSignature(signature string) bool
SetSignature will try to set the given value as the signature of this password container. Returns `true` if and only if the value can be set as signature.
func (*PasswordContainer256) SetSignatureByBytes ¶
func (c *PasswordContainer256) SetSignatureByBytes(data []byte) bool
SetSignatureByBytes will try to set the given value as the signature of this password container. Returns `true` if and only if the value can be set as signature.
func (*PasswordContainer256) SetSignatureByFunc ¶
func (c *PasswordContainer256) SetSignatureByFunc(h func() hash.Hash) bool
SetSignatureByFunc will try to call the given function and use the hash value returned by it to set it as the signature of this password container. Returns `true` if and only if the value can be set as signature.
type PasswordContainer512 ¶
type PasswordContainer512 struct { Header string `json:"header"` Hash512 string `json:"hash512"` Hash256 string `json:"hash256"` Signature string `json:"signature"` }
func (*PasswordContainer512) GetSignature ¶
func (c *PasswordContainer512) GetSignature() string
GetSignature returns the signature field of this password container.
func (*PasswordContainer512) HasSignature ¶
func (c *PasswordContainer512) HasSignature() bool
HasSignature returns true if and only if this password container has a valid signature field.
func (*PasswordContainer512) SetSignature ¶
func (c *PasswordContainer512) SetSignature(signature string) bool
SetSignature will try to set the given value as the signature of this password container. Returns `true` if and only if the value can be set as signature.
func (*PasswordContainer512) SetSignatureByBytes ¶
func (c *PasswordContainer512) SetSignatureByBytes(data []byte) bool
SetSignatureByBytes will try to set the given value as the signature of this password container. Returns `true` if and only if the value can be set as signature.
func (*PasswordContainer512) SetSignatureByFunc ¶
func (c *PasswordContainer512) SetSignatureByFunc(h func() hash.Hash) bool
SetSignatureByFunc will try to call the given function and use the hash value returned by it to set it as the signature of this password container. Returns `true` if and only if the value can be set as signature.