Hi All
Has anybody got the working code to apply the PKCS#5 padding to the text for
encryption. Please let me know as it seems PHP inbuilt functions do not support
this padding at all. Been worried about from past 2 days. Help me out.
Thanks
Binay
Hi All
Has anybody got the working code to apply the PKCS#5 padding to the text for
encryption. Please let me know as it seems PHP inbuilt functions do not support
this padding at all. Been worried about from past 2 days. Help me out.
Thanks
Binay
On 12/9/05, Binay(Local) [EMAIL PROTECTED] wrote:
Hi All
Has anybody got the working code to apply the PKCS#5 padding to the text for
encryption. Please let me know as it seems PHP inbuilt functions do not
support this padding at all. Been worried about from past 2 days. Help me out.
The
U I made a mistake in the second test for validity in the
unpad function. It should be this:
function pkcs5_unpad ($text)
{
$pad = ord($text{strlen($text)-1});
if ($pad strlen($text)) return false;
if (strspn($text, chr($pad), strlen($text) - $pad) != $pad) return false;
return
4 matches
Mail list logo