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

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

Issue 1826543003: Update deprecations. (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 | « CHANGELOG.md ('k') | lib/src/base64/decoder.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:convert'; 5 import 'dart:convert';
6 6
7 import 'base64/decoder.dart'; 7 import 'base64/decoder.dart';
8 import 'base64/encoder.dart'; 8 import 'base64/encoder.dart';
9 9
10 /// An instance of the default implementation of [Base64Codec]. 10 /// This is deprecated.
11 /// 11 ///
12 /// This provides convenient access to most common Base64 use-cases. 12 /// Use the `BASE64` constant in `dart:convert` instead.
13 @Deprecated("Will be removed in crypto 1.0.0.")
13 const Base64Codec BASE64 = const Base64Codec(); 14 const Base64Codec BASE64 = const Base64Codec();
14 15
15 /// A codec that converts between binary data and [Base64][rfc]-encoded strings. 16 /// This is deprecated.
16 /// 17 ///
17 /// [rfc]: https://tools.ietf.org/html/rfc4648 18 /// Use the `Base64Codec` class in `dart:convert` instead.
19 @Deprecated("Will be removed in crypto 1.0.0.")
18 class Base64Codec extends Codec<List<int>, String> { 20 class Base64Codec extends Codec<List<int>, String> {
19 final bool _urlSafe; 21 final bool _urlSafe;
20 final bool _addLineSeparator; 22 final bool _addLineSeparator;
21 final bool _encodePaddingCharacter; 23 final bool _encodePaddingCharacter;
22 24
23 /// Creates a new [Base64Codec]. 25 /// Creates a new [Base64Codec].
24 /// 26 ///
25 /// The default [BASE64] codec will be good enough for most cases. A new codec 27 /// The default [BASE64] codec will be good enough for most cases. A new codec
26 /// only needs to be instantiated when you want to do multiple conversions 28 /// only needs to be instantiated when you want to do multiple conversions
27 /// with the same configuration. 29 /// with the same configuration.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 encodePaddingCharacter: encodePaddingCharacter).convert(bytes); 75 encodePaddingCharacter: encodePaddingCharacter).convert(bytes);
74 } 76 }
75 77
76 Base64Encoder get encoder => new Base64Encoder( 78 Base64Encoder get encoder => new Base64Encoder(
77 urlSafe: _urlSafe, 79 urlSafe: _urlSafe,
78 addLineSeparator: _addLineSeparator, 80 addLineSeparator: _addLineSeparator,
79 encodePaddingCharacter: _encodePaddingCharacter); 81 encodePaddingCharacter: _encodePaddingCharacter);
80 82
81 Base64Decoder get decoder => const Base64Decoder(); 83 Base64Decoder get decoder => const Base64Decoder();
82 } 84 }
OLDNEW
« no previous file with comments | « CHANGELOG.md ('k') | lib/src/base64/decoder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698