| 1 | <?php |
||
| 11 | class ThreemaGateway_Handler_Action_KeyConverter extends ThreemaGateway_Handler_Action_Abstract |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Converts a key from hex to binary format. |
||
| 15 | * |
||
| 16 | * It automatically removes the prefixes if necessary. |
||
| 17 | * |
||
| 18 | * @param string $keyHex The key in hex |
||
| 19 | * @return string |
||
| 20 | */ |
||
| 21 | public function hexToBin($keyHex) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Converts a key from binary to hex format. |
||
| 31 | * |
||
| 32 | * @param string $keyBin The key in binary format |
||
| 33 | * @return string |
||
| 34 | */ |
||
| 35 | public function binToHex($keyBin) |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Converts a key from a private key to a public key version. |
||
| 42 | * |
||
| 43 | * @param string $privateKey The private key in hex |
||
| 44 | * @return string public key in hex |
||
| 45 | */ |
||
| 46 | public function derivePublicKey($privateKey) |
||
| 50 | } |
||
| 51 |