Add Get User Private Key Copy

This commit is contained in:
Samuel Lorch 2025-05-12 19:58:36 +02:00
parent 5cf7839a42
commit 14e5fed276

View file

@ -140,3 +140,11 @@ func (c *Client) DecryptMessageWithSessionKey(sessionKey *crypto.SessionKey, cip
return res.String(), nil
}
func (c *Client) GetUserPrivateKeyCopy() (*crypto.Key, error) {
key, err := c.userPrivateKey.Copy()
if err != nil {
return nil, fmt.Errorf("Get Private Key Copy: %w", err)
}
return key, nil
}