aboutsummaryrefslogtreecommitdiff
path: root/mod/openid_api/vendors/php-openid/Auth/Yadis/Misc.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2013-11-09 16:27:03 +0100
committerSem <sembrestels@riseup.net>2013-11-09 16:27:03 +0100
commit911d0021c374602c31e5bfd71b1cd8074f2c2293 (patch)
tree7e1d529b705e24906d69b9056d7980f0ebabc772 /mod/openid_api/vendors/php-openid/Auth/Yadis/Misc.php
parent5cc7f96262509b2a5d43fa6fbb6cd083064385be (diff)
parent33c206552a0cfd1166b2d5e4fcceb26f5ff1d224 (diff)
downloadelgg-911d0021c374602c31e5bfd71b1cd8074f2c2293.tar.gz
elgg-911d0021c374602c31e5bfd71b1cd8074f2c2293.tar.bz2
Add 'mod/openid_api/' from commit '33c206552a0cfd1166b2d5e4fcceb26f5ff1d224'
git-subtree-dir: mod/openid_api git-subtree-mainline: 5cc7f96262509b2a5d43fa6fbb6cd083064385be git-subtree-split: 33c206552a0cfd1166b2d5e4fcceb26f5ff1d224
Diffstat (limited to 'mod/openid_api/vendors/php-openid/Auth/Yadis/Misc.php')
-rw-r--r--mod/openid_api/vendors/php-openid/Auth/Yadis/Misc.php58
1 files changed, 58 insertions, 0 deletions
diff --git a/mod/openid_api/vendors/php-openid/Auth/Yadis/Misc.php b/mod/openid_api/vendors/php-openid/Auth/Yadis/Misc.php
new file mode 100644
index 000000000..a5afa8e9a
--- /dev/null
+++ b/mod/openid_api/vendors/php-openid/Auth/Yadis/Misc.php
@@ -0,0 +1,58 @@
+<?php
+
+/**
+ * Miscellaneous utility values and functions for OpenID and Yadis.
+ *
+ * @package OpenID
+ * @author JanRain, Inc. <openid@janrain.com>
+ * @copyright 2005-2008 Janrain, Inc.
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache
+ */
+
+function Auth_Yadis_getUCSChars()
+{
+ return array(
+ array(0xA0, 0xD7FF),
+ array(0xF900, 0xFDCF),
+ array(0xFDF0, 0xFFEF),
+ array(0x10000, 0x1FFFD),
+ array(0x20000, 0x2FFFD),
+ array(0x30000, 0x3FFFD),
+ array(0x40000, 0x4FFFD),
+ array(0x50000, 0x5FFFD),
+ array(0x60000, 0x6FFFD),
+ array(0x70000, 0x7FFFD),
+ array(0x80000, 0x8FFFD),
+ array(0x90000, 0x9FFFD),
+ array(0xA0000, 0xAFFFD),
+ array(0xB0000, 0xBFFFD),
+ array(0xC0000, 0xCFFFD),
+ array(0xD0000, 0xDFFFD),
+ array(0xE1000, 0xEFFFD)
+ );
+}
+
+function Auth_Yadis_getIPrivateChars()
+{
+ return array(
+ array(0xE000, 0xF8FF),
+ array(0xF0000, 0xFFFFD),
+ array(0x100000, 0x10FFFD)
+ );
+}
+
+function Auth_Yadis_pct_escape_unicode($char_match)
+{
+ $c = $char_match[0];
+ $result = "";
+ for ($i = 0; $i < strlen($c); $i++) {
+ $result .= "%".sprintf("%X", ord($c[$i]));
+ }
+ return $result;
+}
+
+function Auth_Yadis_startswith($s, $stuff)
+{
+ return strpos($s, $stuff) === 0;
+}
+