From 0d9d576aa642e02eb8673aa20bdf4b6a18ae6bc3 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sat, 20 Aug 2011 04:53:11 -0700 Subject: move encryption functions to crypto file --- include/text.php | 40 ---------------------------------------- 1 file changed, 40 deletions(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index b13cf980f..66447069e 100644 --- a/include/text.php +++ b/include/text.php @@ -620,32 +620,6 @@ function valid_email($x){ }} -if(! function_exists('aes_decrypt')) { -function aes_decrypt($val,$ky) -{ - $key="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; - for($a=0;$a=0 and ord(substr($dec, strlen($dec)-1,1))<=16)? chr(ord( substr($dec,strlen($dec)-1,1))):null)); -}} - - -if(! function_exists('aes_encrypt')) { -function aes_encrypt($val,$ky) -{ - $key="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; - for($a=0;$a strlen($text)) return false; - if (strspn($text, chr($pad), strlen($text) - $pad) != $pad) return false; - return substr($text, 0, -1 * $pad); -} - function base64url_encode($s, $strip_padding = false) { -- cgit v1.2.3