Add privateKey on Person

This commit is contained in:
Matt Baer
2018-06-25 11:32:12 -04:00
parent b417e93a0f
commit 05ac12f10e
2 changed files with 9 additions and 0 deletions
+1
View File
@@ -13,6 +13,7 @@ type (
ID string `json:"id"`
Owner string `json:"owner"`
PublicKeyPEM string `json:"publicKeyPem"`
privateKey []byte
}
Image struct {
+8
View File
@@ -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
}