Conditions | 4 |
Paths | 2 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
102 | private static function selectAlgorithm(string $algorithm): string |
||
103 | { |
||
104 | if ($algorithm === self::SHA256 |
||
105 | || $algorithm === self::SHA384 |
||
106 | || $algorithm === self::SHA512 |
||
107 | ) { |
||
108 | return $algorithm; |
||
109 | } else { |
||
110 | throw new Exception('Invalid or Unsupported Hash Algorithm'); |
||
111 | } |
||
112 | } |
||
113 | |||
120 |