OLD | NEW |
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 library crypto.hmac; | |
6 | |
7 import 'dart:convert'; | 5 import 'dart:convert'; |
8 import 'dart:typed_data'; | 6 import 'dart:typed_data'; |
9 | 7 |
10 import 'package:typed_data/typed_data.dart'; | 8 import 'package:typed_data/typed_data.dart'; |
11 | 9 |
12 import 'digest.dart'; | 10 import 'digest.dart'; |
13 import 'digest_sink.dart'; | 11 import 'digest_sink.dart'; |
14 import 'hash.dart'; | 12 import 'hash.dart'; |
15 | 13 |
16 /// An implementation of [keyed-hash method authentication codes][rfc]. | 14 /// An implementation of [keyed-hash method authentication codes][rfc]. |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 172 |
175 void close() { | 173 void close() { |
176 if (_isClosed) return; | 174 if (_isClosed) return; |
177 _isClosed = true; | 175 _isClosed = true; |
178 | 176 |
179 _innerSink.close(); | 177 _innerSink.close(); |
180 _outerSink.add(_innerResultSink.value.bytes); | 178 _outerSink.add(_innerResultSink.value.bytes); |
181 _outerSink.close(); | 179 _outerSink.close(); |
182 } | 180 } |
183 } | 181 } |
OLD | NEW |