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

Issue 1413923004: Implement cryptographically secure random numbers by using crypto.getRandomValues. (Closed)

Created:
5 years, 2 months ago by Lasse Reichstein Nielsen
Modified:
5 years, 2 months ago
CC:
reviews_dartlang.org, floitsch
Base URL:
https://github.com/dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Patch Set 1 #

Patch Set 2 : Also mock random in jsshell preamble. #

Total comments: 3

Patch Set 3 : Address comment. Refactor and document a little. #

Patch Set 4 : Fix typo in return type. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+106 lines, -7 lines) Patch
M sdk/lib/_internal/js_runtime/lib/math_patch.dart View 1 2 3 3 chunks +90 lines, -4 lines 0 comments Download
M sdk/lib/_internal/js_runtime/lib/preambles/d8.js View 1 chunk +7 lines, -0 lines 0 comments Download
M sdk/lib/_internal/js_runtime/lib/preambles/jsshell.js View 1 1 chunk +7 lines, -0 lines 0 comments Download
M tests/lib/lib.status View 1 chunk +0 lines, -1 line 0 comments Download
M tests/lib/math/random_secure_test.dart View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 10 (3 generated)
Lasse Reichstein Nielsen
Test runs on drt and mocked in d8. Haven't checked the remaining browsers yet.
5 years, 2 months ago (2015-10-22 14:05:03 UTC) #2
kevmoo
On 2015/10/22 14:05:03, Lasse Reichstein Nielsen wrote: > Test runs on drt and mocked in ...
5 years, 2 months ago (2015-10-22 15:15:03 UTC) #4
kevmoo
On 2015/10/22 15:15:03, kevmoo wrote: > On 2015/10/22 14:05:03, Lasse Reichstein Nielsen wrote: > > ...
5 years, 2 months ago (2015-10-22 15:27:16 UTC) #5
floitsch
LGTM. https://codereview.chromium.org/1413923004/diff/20001/sdk/lib/_internal/js_runtime/lib/math_patch.dart File sdk/lib/_internal/js_runtime/lib/math_patch.dart (right): https://codereview.chromium.org/1413923004/diff/20001/sdk/lib/_internal/js_runtime/lib/math_patch.dart#newcode309 sdk/lib/_internal/js_runtime/lib/math_patch.dart:309: int result = random % max; .remainder
5 years, 2 months ago (2015-10-22 19:34:05 UTC) #7
Siggi Cherem (dart-lang)
lgtm!
5 years, 2 months ago (2015-10-22 19:45:11 UTC) #8
Lasse Reichstein Nielsen
Committed patchset #4 (id:60001) manually as b70109683bdf74676a9a3044ab485e756a492530 (presubmit successful).
5 years, 2 months ago (2015-10-23 09:15:25 UTC) #9
Lasse Reichstein Nielsen
5 years, 2 months ago (2015-10-23 10:53:00 UTC) #10
Message was sent while issue was closed.
https://codereview.chromium.org/1413923004/diff/20001/sdk/lib/_internal/js_ru...
File sdk/lib/_internal/js_runtime/lib/math_patch.dart (right):

https://codereview.chromium.org/1413923004/diff/20001/sdk/lib/_internal/js_ru...
sdk/lib/_internal/js_runtime/lib/math_patch.dart:248: final _jsGetRandomValues;
I'm not actually using this, so I'll remove it.

https://codereview.chromium.org/1413923004/diff/20001/sdk/lib/_internal/js_ru...
sdk/lib/_internal/js_runtime/lib/math_patch.dart:309: int result = random % max;
I assume this is a dart2js preference because the result should be the same.

Powered by Google App Engine
This is Rietveld 408576698