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

Unified Diff: lib/crypto/crypto.dart

Issue 10456028: Add base 64 encoding to the crypto library utils. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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 | lib/crypto/crypto_utils.dart » ('j') | lib/crypto/crypto_utils.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/crypto/crypto.dart
diff --git a/lib/crypto/crypto.dart b/lib/crypto/crypto.dart
index 7f193c6451aef9b931f059df05084a3e71c945af..a48c252fb13765d68c97951d063cc02271c011c0 100644
--- a/lib/crypto/crypto.dart
+++ b/lib/crypto/crypto.dart
@@ -106,6 +106,14 @@ class CryptoUtils {
static String bytesToHex(List<int> bytes) {
return _CryptoUtils.bytesToHex(bytes);
}
+
+ /**
+ * Converts a list of bytes (for example a message digest) into a
+ * base64 encoded string.
+ */
+ static String bytesToBase64(List<int> bytes) {
+ return _CryptoUtils.bytesToBase64(bytes);
+ }
}
/**
« no previous file with comments | « no previous file | lib/crypto/crypto_utils.dart » ('j') | lib/crypto/crypto_utils.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698