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