| Total Complexity | 2 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class Nonce extends Element |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * Element name. |
||
| 9 | * |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | const NAME = 'Nonce'; |
||
| 13 | /** |
||
| 14 | * Element name. |
||
| 15 | * |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | const ATTRIBUTE_ENCODING_TYPE = 'EncodingType'; |
||
| 19 | /** |
||
| 20 | * Element name. |
||
| 21 | * |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | const NS_ENCODING = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary'; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Constructor for Nonce element. |
||
| 28 | * |
||
| 29 | * @param string $nonce the nonce value |
||
| 30 | * @param string $namespace the namespace |
||
| 31 | */ |
||
| 32 | 48 | public function __construct($nonce, $namespace = self::NS_WSSE) |
|
| 36 | 24 | ]); |
|
| 37 | 48 | } |
|
| 38 | |||
| 39 | /** |
||
| 40 | * Encode Nonce value. |
||
| 41 | * |
||
| 42 | * @param string $nonce |
||
| 43 | * |
||
| 44 | * @return string |
||
| 45 | */ |
||
| 46 | 48 | public static function encodeNonce($nonce) |
|
| 51 |