Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 668991 of RandomSource

  • Revision slug: Web/API/RandomSource
  • Revision title: RandomSource
  • Revision id: 668991
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{APIRef}}

RandomSource represents a source of cryptographically secure random numbers. It is available via the {{domxref("Crypto")}} object of the global object: {{domxref("Window.crypto")}} on Web pages, {{domxref("WorkerGlobalScope.crypto")}} in workers.

RandomSource is a not an interface and no object of this type can be created.

Properties

RandomSource neither defines nor inherits any property.

Methods

{{ domxref("RandomSource.getRandomValues()") }}
Fills the passed {{ jsxref("TypedArray") }} with cryptographically sound random values.

Revision Source

<p>{{APIRef}}</p>
<p><strong><code>RandomSource</code></strong> represents a source of cryptographically secure random numbers. It is available via the {{domxref("Crypto")}} object of the global object: {{domxref("Window.crypto")}} on Web pages, {{domxref("WorkerGlobalScope.crypto")}} in workers.</p>
<p><code>RandomSource</code> is a not an interface and no object of this type can be created.</p>
<h2 id="Properties">Properties</h2>
<p><em><code>RandomSource</code> neither defines nor inherits any property.</em></p>
<dl>
</dl>
<h2 id="Methods">Methods</h2>
<dl>
 <dt>
  {{ domxref("RandomSource.getRandomValues()") }}</dt>
 <dd>
  Fills the passed {{ jsxref("TypedArray") }} with cryptographically sound random values.</dd>
</dl>
Revert to this revision