1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/webidl/Crypto.webidl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,52 @@ 1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this file, 1.7 + * You can obtain one at http://mozilla.org/MPL/2.0/. 1.8 + * 1.9 + * The origin of this IDL file is 1.10 + * http://www.w3.org/TR/WebCryptoAPI/ 1.11 + */ 1.12 + 1.13 +[NoInterfaceObject] 1.14 +interface RandomSource { 1.15 + [Throws] 1.16 + ArrayBufferView getRandomValues(ArrayBufferView array); 1.17 +}; 1.18 + 1.19 +Crypto implements RandomSource; 1.20 + 1.21 +interface Crypto { 1.22 +}; 1.23 + 1.24 +#ifndef MOZ_DISABLE_CRYPTOLEGACY 1.25 +[NoInterfaceObject] 1.26 +interface CryptoLegacy { 1.27 + readonly attribute DOMString version; 1.28 + 1.29 + [SetterThrows] 1.30 + attribute boolean enableSmartCardEvents; 1.31 + 1.32 + [Throws,NewObject] 1.33 + CRMFObject? generateCRMFRequest(ByteString? reqDN, 1.34 + ByteString? regToken, 1.35 + ByteString? authenticator, 1.36 + ByteString? eaCert, 1.37 + ByteString? jsCallback, 1.38 + any... args); 1.39 + 1.40 + [Throws] 1.41 + DOMString importUserCertificates(DOMString nickname, 1.42 + DOMString cmmfResponse, 1.43 + boolean doForcedBackup); 1.44 + 1.45 + DOMString signText(DOMString stringToSign, 1.46 + DOMString caOption, 1.47 + ByteString... args); 1.48 + 1.49 + [Throws] 1.50 + void logout(); 1.51 +}; 1.52 + 1.53 +Crypto implements CryptoLegacy; 1.54 +#endif // !MOZ_DISABLE_CRYPTOLEGACY 1.55 +