MCPcopy Create free account
hub / github.com/f0ng/autoDecoder / pkcs5_unpad

Method pkcs5_unpad

testsql.php:97–101  ·  view source on GitHub ↗
($text)

Source from the content-addressed store, hash-verified

95 return $text . str_repeat(chr($pad), $pad);
96 }
97 function pkcs5_unpad($text){
98 $pad = ord($text{strlen($text)-1});
99 if ($pad > strlen($text)) {
100 return false;
101 }
102 if (strspn($text, chr($pad), strlen($text) - $pad) != $pad){
103 return false;
104 }

Callers 1

decryptMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected