Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need a cryptographic random number generator #15993

Closed
stevemessick opened this issue Jan 9, 2014 · 5 comments
Closed

Need a cryptographic random number generator #15993

stevemessick opened this issue Jan 9, 2014 · 5 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. type-enhancement A request for a change that isn't a bug

Comments

@stevemessick
Copy link
Contributor

[user feedback]

I need a cryptographic random number generator, but the crypto package doesn't contain one =/ I know about the one in dart:html, but I need one for my console application.

As you support SSL in dart:io, the code should already be there, but no way to use it from Dart.
////////////////////////////////////////////////////////////////////////////////////
Editor: 1.1.0.dev_05_00 (2013-12-20)
OS: Windows 8 - amd64 (6.2)
JVM: 1.7.0_21

projects: 1

open dart files: 0

auto-run pub: true
localhost resolves to: 127.0.0.1
mem max/total/free: 1778 / 772 / 547 MB
thread count: 34
index: 475313 relationships in 92853 keys in 7341 sources

SDK installed: true
Dartium installed: true

@sgjesse
Copy link
Contributor

sgjesse commented Jan 10, 2014

We do have crypto random API internally in dart:io, but it is currently not exposed. At one point there was a discussion on having this in dart:crypto library, but due to it not being available in all browsers it was not done.

We need to figure out if this should be in a dart:crypto library or just in dart:io now that it aparently is in dart:html.


cc @lrhn.
cc @skabet.

@sgjesse
Copy link
Contributor

sgjesse commented Jan 13, 2014

Anders suggested putting this dart:math as we have the pseudo random generator there.

@floitschG
Copy link
Contributor

It won't work on all browsers [0], but otherwise this sgtm.

[0] https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues#Browser_compatibility

Removing myself as owner.


Removed the owner.

@DartBot
Copy link

DartBot commented Feb 27, 2014

This comment was originally written by @Fox32


Same as issue #15064 ?

@stevemessick stevemessick added Type-Enhancement area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. labels Feb 27, 2014
@whesse
Copy link
Member

whesse commented Sep 9, 2015

Duplicate of #1746. Closing, and leaving that one open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

6 participants