mirror of
https://github.com/sailfishos/libsailfishkeyprovider.git
synced 2026-05-25 19:38:51 +02:00
No description
- C 91.8%
- C++ 7.5%
- QMake 0.7%
Fix build with gcc 15. Fix SailfishKeyProvider_ini_sections and SailfishKeyProvider_ini_keys |
||
|---|---|---|
| lib | ||
| rpm | ||
| src | ||
| tests | ||
| libsailfishkeyprovider.pro | ||
| license.lgpl | ||
| README | ||
Provides a class which can provide decoded keys to client applications.
These keys may be useful for OAuth2 sign-on process flows, for example.
Note that this does NOT provide security; it exists to separate the
provision of encoded keys from client application code. The static
stored keys should be provided as:
/usr/share/libsailfishkeyprovider/storedkeys.ini
Example of usage:
@
#include <sailfishkeyprovider.h>
char *buf = NULL;
int success = SailfishKeyProvider_storedKey(
"twitter",
"twitter-sync",
"consumer_key",
&buf);
/* use key in OAuth2 flow */
free(buf);
@
Parameters are:
- provider name (from /usr/share/accounts/providers/ description file)
- service name (from /usr/share/accounts/services/ description file)
- key name (required for OAuth2 flow)
===================
GENERATING NEW KEYS
===================
For your added convenience of not having to edit and recompile unit tests
just to generate some encrypted keys, this now builds an utility:
$ sailfish-keyprovider-keygen xor Secret ClientID
^ ^ ^
/ \ \
method encryption \
key value to be obfuscated
generate_keys:
input: ClientID
encoded: 0 EAkKFwsAGiE=
roundtrip: 0 ClientID