tuzig / capacitor-ssh-plugin

An ssh plugin for hybrid apps, supports both iOS and Android.
MIT License
1 stars 2 forks source link

Add getOrCreateKey #6

Open daonb opened 1 year ago

daonb commented 1 year ago

A new function, addGetOrCreeatKey(tag) will be added to work as follows:

First it queries the keychain if found, it gets the public key by:

let publicKey = SecKeyCopyPublicKey(privateKey)

and returns an object with two string values, one for "public" and one for "private"