Add missing Comments

This commit is contained in:
Samuel Lorch 2021-09-22 13:09:11 +02:00
parent 0e7cca97a2
commit 8e4637492d
2 changed files with 3 additions and 1 deletions

View file

@ -20,6 +20,7 @@ type GPGVerify struct {
Token string `json:"server_verify_token,omitempty"`
}
// SetupServerVerification sets up Server Verification, Only works before login
func (c *Client) SetupServerVerification(ctx context.Context) (string, string, error) {
serverKey, _, err := c.GetPublicKey(ctx)
if err != nil {
@ -41,6 +42,7 @@ func (c *Client) SetupServerVerification(ctx context.Context) (string, string, e
return token, encToken, err
}
// VerifyServer verifys that the Server is still the same one as during the Setup, Only works before login
func (c *Client) VerifyServer(ctx context.Context, token, encToken string) error {
privateKeyObj, err := crypto.NewKeyFromArmored(c.userPrivateKey)
if err != nil {