summaryrefslogtreecommitdiffstats
path: root/lasso/id-ff/provider.c
diff options
context:
space:
mode:
authorFrederic Peters <fpeters@entrouvert.com>2004-12-21 20:57:45 +0000
committerFrederic Peters <fpeters@entrouvert.com>2004-12-21 20:57:45 +0000
commitb8f2c78f2f17aae544b9eb870e2c92e238b5f993 (patch)
treeaa17e99eb8a8c2a5e7bf30e75cdc041e08081725 /lasso/id-ff/provider.c
parent45e5aaeabac20361daaeab539d6b0bd0d3522515 (diff)
downloadlasso-b8f2c78f2f17aae544b9eb870e2c92e238b5f993.tar.gz
lasso-b8f2c78f2f17aae544b9eb870e2c92e238b5f993.tar.xz
lasso-b8f2c78f2f17aae544b9eb870e2c92e238b5f993.zip
added lasso_provider_get_base64_succint_id method to LassoProvider to
facilitate Identity Provider Introduction implementation.
Diffstat (limited to 'lasso/id-ff/provider.c')
-rw-r--r--lasso/id-ff/provider.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/lasso/id-ff/provider.c b/lasso/id-ff/provider.c
index 7d26c5e6..9f6c9290 100644
--- a/lasso/id-ff/provider.c
+++ b/lasso/id-ff/provider.c
@@ -190,6 +190,23 @@ lasso_provider_has_protocol_profile(LassoProvider *provider,
return TRUE;
}
+/**
+ * lasso_provider_get_base64_succint_id
+ * @provider: #LassoProvider
+ *
+ * Computes and returns the base64-encoded provider succint ID.
+ */
+char*
+lasso_provider_get_base64_succint_id(LassoProvider *provider)
+{
+ char *succint_id, *base64_succint_id;
+
+ succint_id = lasso_sha1(provider->ProviderID);
+ base64_succint_id = xmlSecBase64Encode(succint_id, 20, 0);
+ free(succint_id);
+ return base64_succint_id;
+}
+
/*****************************************************************************/
/* private methods */