@@ -9,8 +9,7 @@ |
||
9 | 9 | * |
10 | 10 | * This just contains the constants in the ref10/base.h file |
11 | 11 | */ |
12 | -class ParagonIE_Sodium_Core32_Curve25519_H extends ParagonIE_Sodium_Core32_Util |
|
13 | -{ |
|
12 | +class ParagonIE_Sodium_Core32_Curve25519_H extends ParagonIE_Sodium_Core32_Util { |
|
14 | 13 | /** |
15 | 14 | * See: libsodium's crypto_core/curve25519/ref10/base.h |
16 | 15 | * |
@@ -7,8 +7,7 @@ |
||
7 | 7 | /** |
8 | 8 | * Class ParagonIE_Sodium_Core32_Curve25519_Ge_P3 |
9 | 9 | */ |
10 | -class ParagonIE_Sodium_Core32_Curve25519_Ge_P3 |
|
11 | -{ |
|
10 | +class ParagonIE_Sodium_Core32_Curve25519_Ge_P3 { |
|
12 | 11 | /** |
13 | 12 | * @var ParagonIE_Sodium_Core32_Curve25519_Fe |
14 | 13 | */ |
@@ -7,8 +7,7 @@ |
||
7 | 7 | /** |
8 | 8 | * Class ParagonIE_Sodium_Core32_Curve25519_Ge_P2 |
9 | 9 | */ |
10 | -class ParagonIE_Sodium_Core32_Curve25519_Ge_P2 |
|
11 | -{ |
|
10 | +class ParagonIE_Sodium_Core32_Curve25519_Ge_P2 { |
|
12 | 11 | /** |
13 | 12 | * @var ParagonIE_Sodium_Core32_Curve25519_Fe |
14 | 13 | */ |
@@ -6,8 +6,7 @@ |
||
6 | 6 | /** |
7 | 7 | * Class ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1 |
8 | 8 | */ |
9 | -class ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1 |
|
10 | -{ |
|
9 | +class ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1 { |
|
11 | 10 | /** |
12 | 11 | * @var ParagonIE_Sodium_Core32_Curve25519_Fe |
13 | 12 | */ |
@@ -7,8 +7,7 @@ |
||
7 | 7 | /** |
8 | 8 | * Class ParagonIE_Sodium_Core32_Curve25519_Ge_Cached |
9 | 9 | */ |
10 | -class ParagonIE_Sodium_Core32_Curve25519_Ge_Cached |
|
11 | -{ |
|
10 | +class ParagonIE_Sodium_Core32_Curve25519_Ge_Cached { |
|
12 | 11 | /** |
13 | 12 | * @var ParagonIE_Sodium_Core32_Curve25519_Fe |
14 | 13 | */ |
@@ -7,8 +7,7 @@ |
||
7 | 7 | /** |
8 | 8 | * Class ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp |
9 | 9 | */ |
10 | -class ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp |
|
11 | -{ |
|
10 | +class ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp { |
|
12 | 11 | /** |
13 | 12 | * @var ParagonIE_Sodium_Core32_Curve25519_Fe |
14 | 13 | */ |
@@ -7,8 +7,7 @@ discard block |
||
7 | 7 | /** |
8 | 8 | * Class ParagonIE_Sodium_Core32_ChaCha20_Ctx |
9 | 9 | */ |
10 | -class ParagonIE_Sodium_Core32_ChaCha20_Ctx extends ParagonIE_Sodium_Core32_Util implements ArrayAccess |
|
11 | -{ |
|
10 | +class ParagonIE_Sodium_Core32_ChaCha20_Ctx extends ParagonIE_Sodium_Core32_Util implements ArrayAccess { |
|
12 | 11 | /** |
13 | 12 | * @var SplFixedArray internally, <int, ParagonIE_Sodium_Core32_Int32> |
14 | 13 | */ |
@@ -27,8 +26,7 @@ discard block |
||
27 | 26 | * @throws SodiumException |
28 | 27 | * @throws TypeError |
29 | 28 | */ |
30 | - public function __construct($key = '', $iv = '', $counter = '') |
|
31 | - { |
|
29 | + public function __construct($key = '', $iv = '', $counter = '') { |
|
32 | 30 | if (self::strlen($key) !== 32) { |
33 | 31 | throw new InvalidArgumentException('ChaCha20 expects a 256-bit key.'); |
34 | 32 | } |
@@ -71,8 +69,7 @@ discard block |
||
71 | 69 | * @return void |
72 | 70 | */ |
73 | 71 | #[ReturnTypeWillChange] |
74 | - public function offsetSet($offset, $value) |
|
75 | - { |
|
72 | + public function offsetSet($offset, $value) { |
|
76 | 73 | if (!is_int($offset)) { |
77 | 74 | throw new InvalidArgumentException('Expected an integer'); |
78 | 75 | } |
@@ -95,8 +92,7 @@ discard block |
||
95 | 92 | * @psalm-suppress MixedArrayOffset |
96 | 93 | */ |
97 | 94 | #[ReturnTypeWillChange] |
98 | - public function offsetExists($offset) |
|
99 | - { |
|
95 | + public function offsetExists($offset) { |
|
100 | 96 | return isset($this->container[$offset]); |
101 | 97 | } |
102 | 98 | |
@@ -108,8 +104,7 @@ discard block |
||
108 | 104 | * @psalm-suppress MixedArrayOffset |
109 | 105 | */ |
110 | 106 | #[ReturnTypeWillChange] |
111 | - public function offsetUnset($offset) |
|
112 | - { |
|
107 | + public function offsetUnset($offset) { |
|
113 | 108 | unset($this->container[$offset]); |
114 | 109 | } |
115 | 110 | |
@@ -121,8 +116,7 @@ discard block |
||
121 | 116 | * @psalm-suppress MixedArrayOffset |
122 | 117 | */ |
123 | 118 | #[ReturnTypeWillChange] |
124 | - public function offsetGet($offset) |
|
125 | - { |
|
119 | + public function offsetGet($offset) { |
|
126 | 120 | return isset($this->container[$offset]) |
127 | 121 | ? $this->container[$offset] |
128 | 122 | : null; |
@@ -7,8 +7,7 @@ discard block |
||
7 | 7 | /** |
8 | 8 | * Class ParagonIE_Sodium_Core32_ChaCha20_IetfCtx |
9 | 9 | */ |
10 | -class ParagonIE_Sodium_Core32_ChaCha20_IetfCtx extends ParagonIE_Sodium_Core32_ChaCha20_Ctx |
|
11 | -{ |
|
10 | +class ParagonIE_Sodium_Core32_ChaCha20_IetfCtx extends ParagonIE_Sodium_Core32_ChaCha20_Ctx { |
|
12 | 11 | /** |
13 | 12 | * ParagonIE_Sodium_Core_ChaCha20_IetfCtx constructor. |
14 | 13 | * |
@@ -22,8 +21,7 @@ discard block |
||
22 | 21 | * @throws SodiumException |
23 | 22 | * @throws TypeError |
24 | 23 | */ |
25 | - public function __construct($key = '', $iv = '', $counter = '') |
|
26 | - { |
|
24 | + public function __construct($key = '', $iv = '', $counter = '') { |
|
27 | 25 | if (self::strlen($iv) !== 12) { |
28 | 26 | throw new InvalidArgumentException('ChaCha20 expects a 96-bit nonce in IETF mode.'); |
29 | 27 | } |
@@ -10,8 +10,7 @@ discard block |
||
10 | 10 | * is a good way to avoid littering your code with `if ($this->logger) { }` |
11 | 11 | * blocks. |
12 | 12 | */ |
13 | -class NullLogger extends AbstractLogger |
|
14 | -{ |
|
13 | +class NullLogger extends AbstractLogger { |
|
15 | 14 | /** |
16 | 15 | * Logs with an arbitrary level. |
17 | 16 | * |
@@ -23,8 +22,7 @@ discard block |
||
23 | 22 | * |
24 | 23 | * @throws \Psr\Log\InvalidArgumentException |
25 | 24 | */ |
26 | - public function log($level, $message, array $context = array()) |
|
27 | - { |
|
25 | + public function log($level, $message, array $context = array()) { |
|
28 | 26 | // noop |
29 | 27 | } |
30 | 28 | } |