diff --git a/sshkeys/func.go b/sshkeys/func.go index 3102e8b..8630dc2 100644 --- a/sshkeys/func.go +++ b/sshkeys/func.go @@ -2,15 +2,18 @@ package sshkeys import ( "errors" + + "r00t2.io/goutils/checks" ) -func genPrivKey(cipherAlgo string, kdf string, salt []byte, rounds uint32) ([]byte, error) { - +func genPrivKey(cipherAlgo string, kdf string, salt []byte, rounds uint32, passphrase string) ([]byte, error) { return nil, nil } func genPubKey(privKey *[]byte) ([]byte, error) { - + if *privKey == nil { + return nil, errors.New("must generate private key before public key") + } return nil, nil }