From 5fde85cbfa807b4af914caadf71a79177ad81b1e Mon Sep 17 00:00:00 2001 From: Sorunome Date: Sat, 23 May 2020 17:05:55 +0200 Subject: [PATCH] format --- lib/src/ssss.dart | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/src/ssss.dart b/lib/src/ssss.dart index 62f2348..856229b 100644 --- a/lib/src/ssss.dart +++ b/lib/src/ssss.dart @@ -69,7 +69,8 @@ class SSSS { } } var ciphertext = AES(Key(keys.aesKey), mode: AESMode.ctr, padding: null) - .encrypt(plain, iv: IV(iv)).bytes; + .encrypt(plain, iv: IV(iv)) + .bytes; if (bytesMissing != AES_BLOCKSIZE) { // chop off those extra bytes again ciphertext = ciphertext.sublist(0, plain.length - bytesMissing); @@ -104,12 +105,12 @@ class SSSS { cipher[i] = oldCipher[i]; } } - final decipher = AES(Key(keys.aesKey), mode: AESMode.ctr, padding: null).decrypt( - Encrypted(cipher), - iv: IV(base64.decode(data.iv))); + final decipher = AES(Key(keys.aesKey), mode: AESMode.ctr, padding: null) + .decrypt(Encrypted(cipher), iv: IV(base64.decode(data.iv))); if (bytesMissing != AES_BLOCKSIZE) { // chop off those extra bytes again - return String.fromCharCodes(decipher.sublist(0, decipher.length - bytesMissing)); + return String.fromCharCodes( + decipher.sublist(0, decipher.length - bytesMissing)); } return String.fromCharCodes(decipher); } @@ -145,8 +146,8 @@ class SSSS { throw 'Unknown algorithm'; } final generator = PBKDF2(hashAlgorithm: sha512); - return Uint8List.fromList(generator.generateKey( - password, info.salt, info.iterations, info.bits != null ? info.bits / 8 : 32)); + return Uint8List.fromList(generator.generateKey(password, info.salt, + info.iterations, info.bits != null ? info.bits / 8 : 32)); } String get defaultKeyId {