use pointers

This commit is contained in:
Caleb Doxsey 2022-11-23 08:39:28 -07:00
parent 54fb9fea04
commit c34157d533
4 changed files with 69 additions and 49 deletions

View file

@ -999,10 +999,10 @@ func (o *Options) GetSharedKey() ([]byte, error) {
}
// GetHPKEPrivateKey gets the hpke.PrivateKey dervived from the shared key.
func (o *Options) GetHPKEPrivateKey() (hpke.PrivateKey, error) {
func (o *Options) GetHPKEPrivateKey() (*hpke.PrivateKey, error) {
sharedKey, err := o.GetSharedKey()
if err != nil {
return hpke.PrivateKey{}, err
return nil, err
}
return hpke.DerivePrivateKey(sharedKey), nil