1 | <?php |
||
14 | class EcAdapterFactory |
||
15 | { |
||
16 | /** |
||
17 | * @var EcAdapterInterface |
||
18 | */ |
||
19 | private static $adapter; |
||
20 | |||
21 | /** |
||
22 | * @var |
||
23 | */ |
||
24 | private static $context; |
||
25 | |||
26 | /** |
||
27 | * @param int|null $flags |
||
28 | * @return resource |
||
29 | */ |
||
30 | public static function getSecp256k1Context(int $flags = null) |
||
42 | |||
43 | /** |
||
44 | * @param Math $math |
||
45 | * @param GeneratorPoint $generator |
||
46 | * @return EcAdapterInterface |
||
47 | */ |
||
48 | public static function getAdapter(Math $math, GeneratorPoint $generator): EcAdapterInterface |
||
62 | |||
63 | /** |
||
64 | * @param EcAdapterInterface $ecAdapter |
||
65 | */ |
||
66 | public static function setAdapter(EcAdapterInterface $ecAdapter) |
||
70 | |||
71 | /** |
||
72 | * @param Math $math |
||
73 | * @param GeneratorPoint $generator |
||
74 | * @return PhpEcc |
||
75 | */ |
||
76 | public static function getPhpEcc(Math $math, GeneratorPoint $generator): PhpEcc |
||
80 | |||
81 | /** |
||
82 | * @param Math $math |
||
83 | * @param GeneratorPoint $generator |
||
84 | * @return Secp256k1 |
||
85 | */ |
||
86 | public static function getSecp256k1(Math $math, GeneratorPoint $generator): Secp256k1 |
||
90 | } |
||
91 |