diff options
author | Marius Halden <marius.h@lden.org> | 2017-10-24 21:10:02 +0200 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2017-10-24 21:10:02 +0200 |
commit | 7d3a199e5084831fe08aae7e67f562d9fb3fa07b (patch) | |
tree | c2d1eb73ef18d89c0207b4c3629ac859cf39e191 /facebook/facebook-util.h | |
parent | f5a6c8e103d06d949c6ef292cbfc0af2a6fe42e0 (diff) | |
parent | 553593d07170d6d1563d0079dbedd481dcec5b00 (diff) | |
download | bitlbee-facebook-7d3a199e5084831fe08aae7e67f562d9fb3fa07b.tar.gz bitlbee-facebook-7d3a199e5084831fe08aae7e67f562d9fb3fa07b.tar.bz2 bitlbee-facebook-7d3a199e5084831fe08aae7e67f562d9fb3fa07b.tar.xz |
Merge branch 'master' into track-messagestrack-messages
Diffstat (limited to 'facebook/facebook-util.h')
-rw-r--r-- | facebook/facebook-util.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/facebook/facebook-util.h b/facebook/facebook-util.h index a595cf3..b080eb4 100644 --- a/facebook/facebook-util.h +++ b/facebook/facebook-util.h @@ -289,4 +289,30 @@ fb_util_zlib_deflate(const GByteArray *bytes, GError **error); GByteArray * fb_util_zlib_inflate(const GByteArray *bytes, GError **error); +/** + * fb_util_urlsafe_base64_encode: + * @data: the binary data to encode. + * @len: the length of data + * + * Wrapper around g_base64_encode() which substitutes '-' instead of '+' + * and '_' instead of '/' and removes the padding + * + * Returns: A newly allocated string. + */ + +gchar * +fb_util_urlsafe_base64_encode(const guchar *data, gsize len); + +/** + * fb_util_gen_sso_verifier: + * @challenge: base64 of sha256 of verifier + * @verifier: base64 of random data + * @req_id: base64 of random data + * + * Generates the challenge/response parameters used for the workchat SSO auth. + * All parameters are output parameters. + */ +void +fb_util_gen_sso_verifier(gchar **challenge, gchar **verifier, gchar **req_id); + #endif /* _FACEBOOK_UTIL_H_ */ |