150d715476b1d3a00fb43c13e34a80ea0a01d32bfdandov/* 250d715476b1d3a00fb43c13e34a80ea0a01d32bfdandov * Copyright (C) 2011 Google Inc. All rights reserved. 350d715476b1d3a00fb43c13e34a80ea0a01d32bfdandov * 450d715476b1d3a00fb43c13e34a80ea0a01d32bfdandov * Redistribution and use in source and binary forms, with or without 550d715476b1d3a00fb43c13e34a80ea0a01d32bfdandov * modification, are permitted provided that the following conditions 650d715476b1d3a00fb43c13e34a80ea0a01d32bfdandov * are met: 750d715476b1d3a00fb43c13e34a80ea0a01d32bfdandov * 850d715476b1d3a00fb43c13e34a80ea0a01d32bfdandov * 1. Redistributions of source code must retain the above copyright 950d715476b1d3a00fb43c13e34a80ea0a01d32bfdandov * notice, this list of conditions and the following disclaimer. 10b3c9d1c33caf325aada244204215eb790c228c12dandov * 2. Redistributions in binary form must reproduce the above copyright 11b3c9d1c33caf325aada244204215eb790c228c12dandov * notice, this list of conditions and the following disclaimer in the 12b3c9d1c33caf325aada244204215eb790c228c12dandov * documentation and/or other materials provided with the distribution. 13b3c9d1c33caf325aada244204215eb790c228c12dandov * 3. Neither the name of Google, Inc. ("Google") nor the names of 14b3c9d1c33caf325aada244204215eb790c228c12dandov * its contributors may be used to endorse or promote products derived 15b3c9d1c33caf325aada244204215eb790c228c12dandov * from this software without specific prior written permission. 16b3c9d1c33caf325aada244204215eb790c228c12dandov * 17b3c9d1c33caf325aada244204215eb790c228c12dandov * THIS SOFTWARE IS PROVIDED BY GOOGLE AND ITS CONTRIBUTORS "AS IS" AND ANY 18b3c9d1c33caf325aada244204215eb790c228c12dandov * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19b3c9d1c33caf325aada244204215eb790c228c12dandov * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20b3c9d1c33caf325aada244204215eb790c228c12dandov * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY 21b3c9d1c33caf325aada244204215eb790c228c12dandov * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22b3c9d1c33caf325aada244204215eb790c228c12dandov * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 2350d715476b1d3a00fb43c13e34a80ea0a01d32bfdandov * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24b3c9d1c33caf325aada244204215eb790c228c12dandov * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25ecfff21bde1f0ca3c36533eded325066b5f2d42ddandov * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26963137b75c0a1fe91f35e9826742f36309f5e65ddandov * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27b3c9d1c33caf325aada244204215eb790c228c12dandov */ 28b3c9d1c33caf325aada244204215eb790c228c12dandov 29b3c9d1c33caf325aada244204215eb790c228c12dandov[ 30b3c9d1c33caf325aada244204215eb790c228c12dandov GarbageCollected, 31b3c9d1c33caf325aada244204215eb790c228c12dandov NoInterfaceObject 32b3c9d1c33caf325aada244204215eb790c228c12dandov] interface Crypto { 33b3c9d1c33caf325aada244204215eb790c228c12dandov // Note that getRandomValues() is available even when the "Crypto" 34b3c9d1c33caf325aada244204215eb790c228c12dandov // runtime feature is disabled. 35ecfff21bde1f0ca3c36533eded325066b5f2d42ddandov // 36963137b75c0a1fe91f35e9826742f36309f5e65ddandov // This is for compatibility sake, since getRandomValues() predates the full 37b3c9d1c33caf325aada244204215eb790c228c12dandov // Web Crypto API spec. 38ecfff21bde1f0ca3c36533eded325066b5f2d42ddandov [Custom, RaisesException] ArrayBufferView getRandomValues(ArrayBufferView array); 39963137b75c0a1fe91f35e9826742f36309f5e65ddandov 40b3c9d1c33caf325aada244204215eb790c228c12dandov [RuntimeEnabled=Crypto] readonly attribute SubtleCrypto subtle; 41963137b75c0a1fe91f35e9826742f36309f5e65ddandov}; 42963137b75c0a1fe91f35e9826742f36309f5e65ddandov 43963137b75c0a1fe91f35e9826742f36309f5e65ddandov