File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,9 +73,11 @@ abstract class Benchmark extends BenchmarkBase with BenchmarkTools {
7373
7474 Stream <int > get inputStream => Stream .fromIterable (input);
7575
76- Benchmark (String name, this .size, this .iter)
77- : input = List .filled (size, 0x3f ),
78- super (name);
76+ Benchmark (
77+ super .name,
78+ this .size,
79+ this .iter,
80+ ) : input = List .filled (size, 0x3f );
7981
8082 @override
8183 void exercise () {
@@ -98,9 +100,11 @@ abstract class AsyncBenchmark extends AsyncBenchmarkBase with BenchmarkTools {
98100
99101 Stream <int > get inputStream => Stream .fromIterable (input);
100102
101- AsyncBenchmark (String name, this .size, this .iter)
102- : input = List .filled (size, 0x3f ),
103- super (name);
103+ AsyncBenchmark (
104+ super .name,
105+ this .size,
106+ this .iter,
107+ ) : input = List .filled (size, 0x3f );
104108
105109 @override
106110 Future <void > exercise () async {
Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ import 'xor.dart' as xor;
2323IOSink sink = stdout;
2424RandomAccessFile ? raf;
2525
26- void dump (message) {
27- raf? .writeStringSync (message + ' \n ' );
26+ void dump (String message) {
27+ raf? .writeStringSync ('$ message \n ' );
2828 stdout.writeln (message);
2929}
3030
Original file line number Diff line number Diff line change @@ -34,10 +34,10 @@ class AEADResultWithIV extends AEADResult {
3434 final Uint8List iv;
3535
3636 const AEADResultWithIV ._(
37- Uint8List data,
38- HashDigest tag,
37+ super . data,
38+ super . tag,
3939 this .iv,
40- ) : super ._(data, tag );
40+ ) : super ._();
4141}
4242
4343/// Extends the base [AEADCipherSink] to generate message digest for cipher
Original file line number Diff line number Diff line change @@ -248,11 +248,11 @@ abstract class _AESInGCMModeSinkBase implements CipherSink {
248248/// [AESInGCMModeEncrypt] algorithm.
249249class AESInGCMModeEncryptSink extends _AESInGCMModeSinkBase {
250250 AESInGCMModeEncryptSink (
251- Uint8List key ,
252- Uint8List iv ,
253- Iterable < int > ? aad , [
251+ super ._key ,
252+ super ._iv ,
253+ super ._aad , [
254254 this ._tagSize = 16 ,
255- ]) : super (key, iv, aad) {
255+ ]) {
256256 if (_tagSize < 1 ) {
257257 throw StateError ('Tag size must be at least 1' );
258258 } else if (_tagSize > 16 ) {
@@ -315,11 +315,11 @@ class AESInGCMModeEncryptSink extends _AESInGCMModeSinkBase {
315315/// [AESInGCMModeDecrypt] algorithm.
316316class AESInGCMModeDecryptSink extends _AESInGCMModeSinkBase {
317317 AESInGCMModeDecryptSink (
318- Uint8List key ,
319- Uint8List iv ,
320- Iterable < int > ? aad , [
318+ super ._key ,
319+ super ._iv ,
320+ super ._aad , [
321321 this ._tagSize = 16 ,
322- ]) : super (key, iv, aad) {
322+ ]) {
323323 if (_tagSize < 1 ) {
324324 throw StateError ('Tag size must be at least 1' );
325325 } else if (_tagSize > 16 ) {
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ class XOR extends Cipher {
7474
7575 const XOR (this .key);
7676
77- /// Creates a [XOR] with List<int> [key] , transforming every elements to
77+ /// Creates a [XOR] with ` List<int>` [key] , transforming every elements to
7878 /// unsigned 8-bit numbers.
7979 factory XOR .fromList (List <int > key) =>
8080 XOR (key is Uint8List ? key : Uint8List .fromList (key));
Original file line number Diff line number Diff line change @@ -22,10 +22,10 @@ import 'utils/nonce.dart';
2222class ChaCha20Poly1305 extends AEADCipher <ChaCha20 , Poly1305 >
2323 with SaltedCipher {
2424 const ChaCha20Poly1305 ._(
25- ChaCha20 cipher,
26- Poly1305 mac,
27- List < int > ? aad,
28- ) : super (cipher, mac, aad) ;
25+ super . cipher,
26+ super . mac,
27+ super . aad,
28+ );
2929
3030 /// Creates a new instance of the [ChaCha20Poly1305] cipher.
3131 ///
Original file line number Diff line number Diff line change @@ -15,10 +15,10 @@ import 'utils/nonce.dart';
1515/// authentication code.
1616class Salsa20Poly1305 extends AEADCipher <Salsa20 , Poly1305 > with SaltedCipher {
1717 const Salsa20Poly1305 ._(
18- Salsa20 cipher,
19- Poly1305 mac,
20- List < int > ? aad,
21- ) : super (cipher, mac, aad) ;
18+ super . cipher,
19+ super . mac,
20+ super . aad,
21+ );
2222
2323 /// Creates a new instance of the [Salsa20Poly1305] cipher.
2424 ///
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ class Nonce extends _NonceBase {
109109
110110/// The 64-bit initialization vector builder.
111111class Nonce64 extends Nonce {
112- const Nonce64 ._(Uint8List bytes) : super ._(bytes );
112+ const Nonce64 ._(super . bytes) : super ._();
113113
114114 /// Create a 64-bit nonce with zeros
115115 factory Nonce64 .zero () => Nonce64 ._(Uint8List (8 ));
@@ -172,7 +172,7 @@ class Nonce64 extends Nonce {
172172
173173/// The 128-bit initialization vector builder.
174174class Nonce128 extends Nonce {
175- const Nonce128 ._(Uint8List bytes) : super ._(bytes );
175+ const Nonce128 ._(super . bytes) : super ._();
176176
177177 /// Create a 128-bit nonce with zeros
178178 factory Nonce128 .zero () => Nonce128 ._(Uint8List (16 ));
Original file line number Diff line number Diff line change @@ -20,10 +20,10 @@ import 'utils/nonce.dart';
2020class XChaCha20Poly1305 extends AEADCipher <XChaCha20 , Poly1305 >
2121 with SaltedCipher {
2222 const XChaCha20Poly1305 ._(
23- XChaCha20 cipher,
24- Poly1305 mac,
25- List < int > ? aad,
26- ) : super (cipher, mac, aad) ;
23+ super . cipher,
24+ super . mac,
25+ super . aad,
26+ );
2727
2828 /// Creates a new instance of the [XChaCha20Poly1305] cipher.
2929 ///
Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ import 'utils/nonce.dart';
1616class XSalsa20Poly1305 extends AEADCipher <XSalsa20 , Poly1305 >
1717 with SaltedCipher {
1818 const XSalsa20Poly1305 ._(
19- XSalsa20 cipher,
20- Poly1305 mac,
21- List < int > ? aad,
22- ) : super (cipher, mac, aad) ;
19+ super . cipher,
20+ super . mac,
21+ super . aad,
22+ );
2323
2424 /// Creates a new instance of the [XSalsa20Poly1305] cipher.
2525 ///
You can’t perform that action at this time.
0 commit comments