| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library crypto.base64.encoder; | |
| 6 | |
| 7 import 'dart:convert'; | 5 import 'dart:convert'; |
| 8 | 6 |
| 9 import 'package:charcode/ascii.dart'; | 7 import 'package:charcode/ascii.dart'; |
| 10 | 8 |
| 11 import 'encoder_sink.dart'; | 9 import 'encoder_sink.dart'; |
| 12 | 10 |
| 13 /// A String representing a mapping from numbers between 0 and 63, inclusive, to | 11 /// A String representing a mapping from numbers between 0 and 63, inclusive, to |
| 14 /// their corresponding encoded character. | 12 /// their corresponding encoded character. |
| 15 /// | 13 /// |
| 16 /// This is the table for URL-safe encodings. | 14 /// This is the table for URL-safe encodings. |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 } | 140 } |
| 143 | 141 |
| 144 Base64EncoderSink startChunkedConversion(Sink<String> sink) { | 142 Base64EncoderSink startChunkedConversion(Sink<String> sink) { |
| 145 StringConversionSink stringSink = sink is StringConversionSink | 143 StringConversionSink stringSink = sink is StringConversionSink |
| 146 ? sink | 144 ? sink |
| 147 : new StringConversionSink.from(sink); | 145 : new StringConversionSink.from(sink); |
| 148 | 146 |
| 149 return new Base64EncoderSink(stringSink, _urlSafe, _addLineSeparator); | 147 return new Base64EncoderSink(stringSink, _urlSafe, _addLineSeparator); |
| 150 } | 148 } |
| 151 } | 149 } |
| OLD | NEW |