1 <?php
2 /**
3 * @author Krzysztof Gzocha <krzysztof.gzocha@xsolve.pl>
4 */
5 namespace Team3\PayU\SignatureCalculator;
6
7 use Team3\PayU\Configuration\Credentials\CredentialsInterface;
8 use Team3\PayU\SignatureCalculator\Encoder\Algorithms\AlgorithmInterface;
9
10 /**
11 * Is responsible to concat data, add private key and encrypt with given algorithm.
12 *
13 * Interface SignatureCalculatorInterface
14 * @package Team3\PayU\SignatureCalculator
15 */
16 interface SignatureCalculatorInterface
17 {
18 /**
19 * @param string[] $data
20 * @param CredentialsInterface $credentials
21 * @param AlgorithmInterface $algorithm
22 *
23 * @return string
24 * @throws SignatureCalculatorException
25 */
26 public function calculate(
27 array $data,
28 CredentialsInterface $credentials,
29 AlgorithmInterface $algorithm
30 );
31 }
32