Completed
Push — master ( 1a48b1...65cd04 )
by Ramon
02:01
created

Util::pkcs5_pad()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
namespace Codecraft63\CertsignLogin;
4
5
trait Util
6
{
7
    private static function pkcs5_pad(string $text, integer $blockSize): string
8
    {
9
        $pad = $blockSize - (strlen($text) % $blockSize);
10
        return $text . str_repeat(chr($pad), $pad);
11
    }
12
}
13