Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PrivateKey ed25519.PrivateKey
PrivateKey is the global var for setting the private key
View Source
var PublicKey ed25519.PublicKey
PublicKey is the global var for setting the public key
Functions ¶
Types ¶
type SignedResponse ¶
type SignedResponse struct { Data json.RawMessage `json:"data"` CreatedAt time.Time `json:"created_at"` Signature []byte `json:"signature"` }
func Sign ¶
func Sign(data interface{}) (sr *SignedResponse, err error)
Sign creates the signed response using the global private key variable
func (*SignedResponse) Sign ¶
func (r *SignedResponse) Sign(priv ed25519.PrivateKey)
Sign signs the data with timestamp and private key
func (SignedResponse) TimestampedData ¶
func (r SignedResponse) TimestampedData() (d []byte)
TimestampedData combines data and timestamp
Click to show internal directories.
Click to hide internal directories.