[sword-devel] How to validate a Sword module unlock key?
greg.hellings at gmail.com
Sun Jan 12 11:53:15 MST 2020
On Sun, Jan 12, 2020 at 10:32 AM Tobias Klein <contact at tklein.info> wrote:
> I'm adding Sword module unlock support to Ezra Project and I've been
> wondering how you would validate a given unlock key?
> Basically the dialog for entering the unlock key is shown when a locked
> module is selected for installation. Before going through the effort of
> installing a module I would like to make sure that the given unlock key
> actually works with the selected module. Is there something in the SWORD
> API that supports the validation of the unlock key entered by the user?
The last time this came up, I believe the answer was that you just have to
try it and display it to the user and they have to decide if the results
are human readable.
It would be possible to include a field in modules with a known-good value,
then the API could test if that value matched what was expected when it was
decrypted. Unless that functionality already exists, I don't know of any
other way you could accomplish this.
> Best regards,
> sword-devel mailing list: sword-devel at crosswire.org
> Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the sword-devel