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

Unified Diff: pkg/crypto/lib/src/crypto_utils.dart

Issue 169363008: pkg/crypto: move tests to unittest package (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: feedback Created 6 years, 10 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 | « no previous file | pkg/crypto/lib/src/hash_utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/crypto/lib/src/crypto_utils.dart
diff --git a/pkg/crypto/lib/src/crypto_utils.dart b/pkg/crypto/lib/src/crypto_utils.dart
index b593c0d6f53c9ea99887a3b5207cdeef9c1a63a7..515c1e95eaffa121ac3482497adb86d3efc1acfd 100644
--- a/pkg/crypto/lib/src/crypto_utils.dart
+++ b/pkg/crypto/lib/src/crypto_utils.dart
@@ -78,9 +78,9 @@ abstract class _CryptoUtils {
out[j++] = lookup.codeUnitAt(x & 0x3f);
// Add optional line separator for each 76 char output.
if (addLineSeparator && ++c == 19 && j < outputLen - 2) {
- out[j++] = CR;
- out[j++] = LF;
- c = 0;
+ out[j++] = CR;
+ out[j++] = LF;
+ c = 0;
}
}
@@ -117,7 +117,7 @@ abstract class _CryptoUtils {
int c = _decodeTable[input.codeUnitAt(i)];
if (c < 0) {
extrasLen++;
- if(c == -2) {
+ if (c == -2) {
throw new FormatException('Invalid character: ${input[i]}');
}
}
@@ -138,10 +138,10 @@ abstract class _CryptoUtils {
int outputLen = (((len - extrasLen) * 6) >> 3) - padLength;
List<int> out = new List<int>(outputLen);
- for (int i = 0, o = 0; o < outputLen;) {
+ for (int i = 0, o = 0; o < outputLen; ) {
// Accumulate 4 valid 6 bit Base 64 characters into an int.
int x = 0;
- for (int j = 4; j > 0;) {
+ for (int j = 4; j > 0; ) {
int c = _decodeTable[input.codeUnitAt(i++)];
if (c >= 0) {
x = ((x << 6) & 0xFFFFFF) | c;
« no previous file with comments | « no previous file | pkg/crypto/lib/src/hash_utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698