michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: * michael@0: * The origin of this IDL file is michael@0: * http://www.w3.org/TR/WebCryptoAPI/ michael@0: */ michael@0: michael@0: [NoInterfaceObject] michael@0: interface RandomSource { michael@0: [Throws] michael@0: ArrayBufferView getRandomValues(ArrayBufferView array); michael@0: }; michael@0: michael@0: Crypto implements RandomSource; michael@0: michael@0: interface Crypto { michael@0: }; michael@0: michael@0: #ifndef MOZ_DISABLE_CRYPTOLEGACY michael@0: [NoInterfaceObject] michael@0: interface CryptoLegacy { michael@0: readonly attribute DOMString version; michael@0: michael@0: [SetterThrows] michael@0: attribute boolean enableSmartCardEvents; michael@0: michael@0: [Throws,NewObject] michael@0: CRMFObject? generateCRMFRequest(ByteString? reqDN, michael@0: ByteString? regToken, michael@0: ByteString? authenticator, michael@0: ByteString? eaCert, michael@0: ByteString? jsCallback, michael@0: any... args); michael@0: michael@0: [Throws] michael@0: DOMString importUserCertificates(DOMString nickname, michael@0: DOMString cmmfResponse, michael@0: boolean doForcedBackup); michael@0: michael@0: DOMString signText(DOMString stringToSign, michael@0: DOMString caOption, michael@0: ByteString... args); michael@0: michael@0: [Throws] michael@0: void logout(); michael@0: }; michael@0: michael@0: Crypto implements CryptoLegacy; michael@0: #endif // !MOZ_DISABLE_CRYPTOLEGACY michael@0: