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

Side by Side Diff: lib/src/sha256.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/sha1.dart ('k') | pubspec.yaml » ('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 import 'dart:typed_data'; 6 import 'dart:typed_data';
7 7
8 import 'digest.dart'; 8 import 'digest.dart';
9 import 'hash.dart'; 9 import 'hash.dart';
10 import 'hash_sink.dart'; 10 import 'hash_sink.dart';
(...skipping 16 matching lines...) Expand all
27 final int blockSize = 16 * bytesPerWord; 27 final int blockSize = 16 * bytesPerWord;
28 28
29 Sha256._(); 29 Sha256._();
30 30
31 Sha256 newInstance() => new Sha256._(); 31 Sha256 newInstance() => new Sha256._();
32 32
33 ByteConversionSink startChunkedConversion(Sink<Digest> sink) => 33 ByteConversionSink startChunkedConversion(Sink<Digest> sink) =>
34 new ByteConversionSink.from(new _Sha256Sink(sink)); 34 new ByteConversionSink.from(new _Sha256Sink(sink));
35 } 35 }
36 36
37 /// This class is deprecated.
38 ///
39 /// Use [sha256] instead.
40 @Deprecated("Will be removed in crypto 1.0.0.")
41 class SHA256 extends Sha256 {
42 SHA256() : super._();
43
44 SHA256 newInstance() => new SHA256();
45 }
46
47 /// Data from a non-linear function that functions as reproducible noise. 37 /// Data from a non-linear function that functions as reproducible noise.
48 const List<int> _noise = const [ 38 const List<int> _noise = const [
49 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 39 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1,
50 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 40 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
51 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 41 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786,
52 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 42 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
53 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 43 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,
54 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 44 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
55 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 45 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b,
56 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 46 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 digest[0] = add32(a, digest[0]); 132 digest[0] = add32(a, digest[0]);
143 digest[1] = add32(b, digest[1]); 133 digest[1] = add32(b, digest[1]);
144 digest[2] = add32(c, digest[2]); 134 digest[2] = add32(c, digest[2]);
145 digest[3] = add32(d, digest[3]); 135 digest[3] = add32(d, digest[3]);
146 digest[4] = add32(e, digest[4]); 136 digest[4] = add32(e, digest[4]);
147 digest[5] = add32(f, digest[5]); 137 digest[5] = add32(f, digest[5]);
148 digest[6] = add32(g, digest[6]); 138 digest[6] = add32(g, digest[6]);
149 digest[7] = add32(h, digest[7]); 139 digest[7] = add32(h, digest[7]);
150 } 140 }
151 } 141 }
OLDNEW
« no previous file with comments | « lib/src/sha1.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698