add generateMnemonic

This commit is contained in:
Andrea Franz 2021-10-21 10:13:44 +02:00
parent feff5ec90b
commit 71ab4cb075
No known key found for this signature in database
GPG Key ID: 4F0D2F2D9DE7F29D

View File

@ -249,6 +249,21 @@ func (kc *keycardContext) generateKey() ([]byte, error) {
return keyUID, nil
}
func (kc *keycardContext) generateMnemonic(checksumSize int) ([]int, error) {
<-kc.connected
if kc.runErr != nil {
return nil, kc.runErr
}
indexes, err := kc.cmdSet.GenerateMnemonic(checksumSize)
if err != nil {
l("generateMnemonic failed %+v", err)
return nil, err
}
return indexes, nil
}
func (kc *keycardContext) removeKey() error {
<-kc.connected
if kc.runErr != nil {