Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(609)

Unified Diff: lib/src/crypto_utils.dart

Issue 1349373002: Improve the style of code in lib/. (Closed) Base URL: git@github.com:dart-lang/crypto.git@master
Patch Set: Code review changes Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/base64/encoder_sink.dart ('k') | lib/src/hash_base.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/crypto_utils.dart
diff --git a/lib/src/crypto_utils.dart b/lib/src/crypto_utils.dart
index 821fd2b76e80094a276f1fa403726d43954dedcd..5812a3929ad78b66a9acb120b0b24427dfd76712 100644
--- a/lib/src/crypto_utils.dart
+++ b/lib/src/crypto_utils.dart
@@ -31,10 +31,9 @@ abstract class CryptoUtils {
/// If [urlSafe] is true, the resulting string will be URL- and filename-
/// safe.
static String bytesToBase64(List<int> bytes,
- {bool urlSafe: false, bool addLineSeparator: false}) {
- return BASE64.encode(bytes,
- urlSafe: urlSafe, addLineSeparator: addLineSeparator);
- }
+ {bool urlSafe: false, bool addLineSeparator: false}) =>
+ BASE64.encode(bytes,
+ urlSafe: urlSafe, addLineSeparator: addLineSeparator);
/// Converts a [Base64-encoded][rfc] String into list of bytes.
///
@@ -44,7 +43,5 @@ abstract class CryptoUtils {
/// -unsafe Base 64 encoded strings.
///
/// Throws a [FormatException] if [input] contains invalid characters.
- static List<int> base64StringToBytes(String input) {
- return BASE64.decode(input);
- }
+ static List<int> base64StringToBytes(String input) => BASE64.decode(input);
}
« no previous file with comments | « lib/src/base64/encoder_sink.dart ('k') | lib/src/hash_base.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698