Emily Stark
cc667a487f
code review comments from glasser, nim
2014-04-17 16:12:24 -07:00
Emily Stark
e544a8e03a
Increase length of security-critical random tokens. Add Random.secret.
2014-04-17 16:12:16 -07:00
Justin SB
f2a2b2eb74
Revert createRandomGenerator function creation; no longer needed
2014-03-20 17:05:04 -07:00
Justin SB
a6e9ae392b
Rename create -> createWithSeeds, require parameters
2014-03-20 17:05:04 -07:00
Justin Santa Barbara
64f0c73b6b
Refactor Random.create() to be consistent with the global Random creation
2014-03-20 17:05:04 -07:00
Emily Stark
d564ab4b99
Fix SeededRandom's use of Random's alea.
...
Thanks glasser
2013-11-21 10:14:03 -08:00
Emily Stark
2413a8d3ed
Use cryptographic PRNGs when available.
...
This means node's crypto.randomBytes on the server, and
window.crypto.getRandomValues on the client. If node's crypto.randomBytes throws
an exception, we fall back to crypto.pseudoRandomBytes. If
window.crypto.getRandomValues isn't supported by the browser, we fall back to
the alea generator that we had been using previously.
2013-09-25 15:53:04 -07:00
David Glasser
9f38258b54
Drop all @export lines. Add api.exportSymbol instead.
2013-07-25 18:54:40 -07:00
David Glasser
8a7b1ddf35
Merge branch 'devel' into linker.
...
Conflicts:
meteor
packages/absolute-url/.gitignore
packages/accounts-base/package.js
packages/accounts-oauth/package.js
packages/audit-argument-checks/.gitignore
packages/coffeescript/.gitignore
packages/coffeescript/package.js
packages/localstorage-polyfill/.gitignore
packages/oauth1/package.js
packages/oauth2/package.js
packages/random/random.js
scripts/generate-dev-bundle.sh
tools/packages.js
tools/run.js
tools/server/server.js
2013-05-28 15:10:48 -07:00
Andrew Wilcox
1ad813951b
Allow new Random instances to be constructed with specified seed.
...
For repeatable unit test failures with "random" data it's useful to be
able to create deterministic random number sequences.
Introduce `Random.create(seed...)` which returns a object with the
`Random` API (`id()`, `choice()`, etc.) initialized with the passed
seed(s).
2013-05-22 21:34:39 -07:00
David Glasser
6b48e8bd8a
stuff that doesn't have conflicts
2013-05-13 11:51:50 -07:00
David Glasser
5a5204e3a4
Remove closures around package files. (hint: git blame -w)
...
The bundler now adds closures around client files and the server adds closures
around server files.
2013-03-19 15:13:53 -07:00
David Glasser
516f4dfaf7
Move Meteor.uuid to past package. Add Random.hexString.
2013-02-13 00:42:05 -08:00
David Glasser
b3d1fe4112
move objectid generation back into objectid class
2013-02-13 00:10:26 -08:00
David Glasser
9b486b3c9b
Meteor.random -> Random.fraction
...
add Random.choice
2013-02-13 00:08:50 -08:00
David Glasser
d2ae5f7e1c
Replace almost all uses of Meteor.uuid with Random.id.
2013-02-12 23:55:19 -08:00
David Glasser
ed36db211d
Use Random.id() in Spark.
...
We couldn't use Meteor.uuid() because it contained '-' but Random.id() is fine.
2013-02-12 23:51:34 -08:00
David Glasser
e95bcb870c
Get rid of duplicate random code inside minimongo.
...
Temporarily move the objectid-specific function into random.js.
2013-02-12 23:49:43 -08:00
David Glasser
eb14cfceeb
Rename Meteor.id() -> Random.id()
2013-02-12 23:44:04 -08:00
David Glasser
fdb1773d4a
Rename uuid package to random. No further changes.
2013-02-12 23:38:22 -08:00