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

Unified Diff: packages/convert/lib/src/hex.dart

Issue 2990843002: Removed fixed dependencies (Closed)
Patch Set: Created 3 years, 5 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 | « packages/convert/lib/src/byte_accumulator_sink.dart ('k') | packages/convert/lib/src/hex/decoder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/convert/lib/src/hex.dart
diff --git a/packages/convert/lib/src/hex.dart b/packages/convert/lib/src/hex.dart
new file mode 100644
index 0000000000000000000000000000000000000000..ec4451e4cd23d1ce3466f283ef9adc26051ae253
--- /dev/null
+++ b/packages/convert/lib/src/hex.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library convert.hex;
+
+import 'dart:convert';
+
+import 'hex/encoder.dart';
+import 'hex/decoder.dart';
+
+export 'hex/encoder.dart' hide hexEncoder;
+export 'hex/decoder.dart' hide hexDecoder;
+
+/// The canonical instance of [HexCodec].
+const hex = const HexCodec._();
+
+/// A codec that converts byte arrays to and from hexadecimal strings, following
+/// [the Base16 spec][rfc].
+///
+/// [rfc]: https://tools.ietf.org/html/rfc4648#section-8
+///
+/// This should be used via the [hex] field.
+class HexCodec extends Codec<List<int>, String> {
+ HexEncoder get encoder => hexEncoder;
+ HexDecoder get decoder => hexDecoder;
+
+ const HexCodec._();
+}
« no previous file with comments | « packages/convert/lib/src/byte_accumulator_sink.dart ('k') | packages/convert/lib/src/hex/decoder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698