<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.whatwg.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=BrendanEich</id>
	<title>WHATWG Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.whatwg.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=BrendanEich"/>
	<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/wiki/Special:Contributions/BrendanEich"/>
	<updated>2026-05-11T16:46:11Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Crypto&amp;diff=6458</id>
		<title>Crypto</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Crypto&amp;diff=6458"/>
		<updated>2011-05-25T21:44:11Z</updated>

		<summary type="html">&lt;p&gt;BrendanEich: fix typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
&lt;br /&gt;
This document describes a proposal for the window.crypto API.&lt;br /&gt;
&lt;br /&gt;
=Definitions=&lt;br /&gt;
&lt;br /&gt;
==Cryptographically Random Values==&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;cryptographically random value&#039;&#039; is a value generated from a cryptographically strong pseudo-random number generator seeded with truly random values.  In practice, implementations should generate cryptographically random values using well-established cryptographic pseudo-random number generators, such as RC4, seeded with high-quality entropy, such as from an operating-system entropy source (e.g., &#039;&#039;/dev/urandom&#039;&#039;).  This document provides no lower-bound on the information theoretic entropy present in cryptographically random values, but implementations should make a best effort to provide as much entropy as practicable.&lt;br /&gt;
&lt;br /&gt;
=Interface=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject]&lt;br /&gt;
interface Crypto {&lt;br /&gt;
  void getRandomValues(in ArrayBufferView array);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
[Supplemental, NoInterfaceObject]&lt;br /&gt;
interface Window {&lt;br /&gt;
  readonly attribute Crypto crypto;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Methods=&lt;br /&gt;
&lt;br /&gt;
==getRandomValues==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;getRandomValues&#039;&#039; method fills &#039;&#039;array&#039;&#039; with random data.  Specifically, if &#039;&#039;array&#039;&#039; is an [http://www.khronos.org/registry/typedarray/specs/latest/#6 ArrayBufferView] of an integer type (i.e., Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, or Uint32Array), then all the elements of &#039;&#039;array&#039;&#039; are overwritten with &#039;&#039;cryptographically random values&#039;&#039; of the appropriate type.  If &#039;&#039;array&#039;&#039; is not of an integer type, &#039;&#039;getRandomValues&#039;&#039; throws a [http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-type_mismatch_err TYPE_MISMATCH_ERR].&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>BrendanEich</name></author>
	</entry>
</feed>