fix typo / improve documentatation

This commit is contained in:
William Gotti 2019-05-13 12:33:01 +00:00 committed by Daniel Huigens
parent 701dc26ab5
commit 5cdec38a18
16 changed files with 77 additions and 187 deletions

View file

@ -11,8 +11,7 @@ import (
"strings"
)
// Use: ios/android only
//CheckPassphrase check is private key passphrase ok
// CheckPassphrase checks if private key passphrase ok
func CheckPassphrase(privateKey string, passphrase string) bool {
privKeyReader := strings.NewReader(privateKey)
entries, err := openpgp.ReadArmoredKeyRing(privKeyReader)
@ -42,8 +41,7 @@ func CheckPassphrase(privateKey string, passphrase string) bool {
return true
}
// Use: ios/android only
// PublicKey get a public key from a private key
// PublicKey gets a public key from a private key
func PublicKey(privateKey string) (string, error) {
privKeyReader := strings.NewReader(privateKey)
entries, err := openpgp.ReadArmoredKeyRing(privKeyReader)
@ -64,8 +62,7 @@ func PublicKey(privateKey string) (string, error) {
return outString, nil
}
// Use: ios/android only
// PublicKeyBinOut get a public key from a private key
// PublicKeyBinOut gets a public key from a private key
func PublicKeyBinOut(privateKey string) ([]byte, error) {
privKeyReader := strings.NewReader(privateKey)
entries, err := openpgp.ReadArmoredKeyRing(privKeyReader)