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

Side by Side Diff: lib/src/crypto_utils.dart

Issue 1819293003: Remove deprecated APIs. (Closed) Base URL: git@github.com:dart-lang/crypto.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « lib/src/base64/encoder_sink.dart ('k') | lib/src/hash.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'base64.dart';
6
7 /// This class is deprecated.
8 @Deprecated("Will be removed in crypto 1.0.0.")
9 abstract class CryptoUtils {
10 /// This is deprecated.
11 ///
12 /// Use `hex` from `package:convert` instead.
13 static String bytesToHex(List<int> bytes) {
14 var result = new StringBuffer();
15 for (var part in bytes) {
16 result.write('${part < 16 ? '0' : ''}${part.toRadixString(16)}');
17 }
18 return result.toString();
19 }
20
21 /// This is deprecated.
22 ///
23 /// Use `BASE64` from `dart:convert` instead.
24 static String bytesToBase64(List<int> bytes,
25 {bool urlSafe: false, bool addLineSeparator: false}) =>
26 BASE64.encode(bytes,
27 urlSafe: urlSafe, addLineSeparator: addLineSeparator);
28
29 /// This is deprecated.
30 ///
31 /// Use `BASE64` from `dart:convert` instead.
32 static List<int> base64StringToBytes(String input) => BASE64.decode(input);
33 }
OLDNEW
« no previous file with comments | « lib/src/base64/encoder_sink.dart ('k') | lib/src/hash.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698