web icon indicating copy to clipboard operation
web copied to clipboard

PSK Generator

Open Hunter275 opened this issue 1 year ago • 1 comments

Added a password generator to match iOS ability.

Still a work in progress, more putting this out to have a place for note taking:

TODO: Button changes input value ✅ PSK length dropdown changes password generation ✅ PSK key generation ✅ PSK loading from device ✅
PSK saving to device ⌛ PSK length validation ⌛

Hunter275 avatar Jul 28 '24 19:07 Hunter275

To generate a password on iOS:

https://github.com/meshtastic/Meshtastic-Apple/blob/07c1018b538ea3bedd72ed243d9041d723650cb4/Meshtastic/Views/Settings/Channels.swift#L17

We use SecRandomCopyBytes() (https://developer.apple.com/documentation/security/1399291-secrandomcopybytes) to create a random input and then we encode it using base64EncodedString()

Hunter275 avatar Jul 28 '24 19:07 Hunter275

Thanks yall

Hunter275 avatar Aug 15 '24 23:08 Hunter275