| Conditions | 4 |
| Paths | 3 |
| Total Lines | 19 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | protected static function validHMACOutputLength(string $value, string $message = ''): void |
||
| 31 | { |
||
| 32 | try { |
||
| 33 | parent::regex( |
||
| 34 | $value, |
||
| 35 | self::$HMACOutputLength_regex, |
||
| 36 | $message ?: '%s is not a valid ds:HMACOutputLengthType', |
||
| 37 | ); |
||
| 38 | } catch (AssertionFailedException $e) { |
||
| 39 | throw new SchemaViolationException($e->getMessage()); |
||
| 40 | } |
||
| 41 | |||
| 42 | try { |
||
| 43 | parent::true( |
||
| 44 | intval($value) % 8 === 0, |
||
| 45 | '%s is not devisible by 8 and therefore not a valid ds:HMACOutputLengthType', |
||
| 46 | ); |
||
| 47 | } catch (AssertionFailedException $e) { |
||
| 48 | throw new ProtocolViolationException($e->getMessage()); |
||
| 49 | } |
||
| 52 |