Add privateKey on Person
This commit is contained in:
@@ -13,6 +13,7 @@ type (
|
||||
ID string `json:"id"`
|
||||
Owner string `json:"owner"`
|
||||
PublicKeyPEM string `json:"publicKeyPem"`
|
||||
privateKey []byte
|
||||
}
|
||||
|
||||
Image struct {
|
||||
|
||||
@@ -41,3 +41,11 @@ func (p *Person) AddPubKey(k []byte) {
|
||||
PublicKeyPEM: string(k),
|
||||
}
|
||||
}
|
||||
|
||||
func (p *Person) SetPrivKey(k []byte) {
|
||||
p.PublicKey.privateKey = k
|
||||
}
|
||||
|
||||
func (p *Person) GetPrivKey() []byte {
|
||||
return p.PublicKey.privateKey
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user