1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/base/nsIEntropyCollector.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,35 @@ 1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 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 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "nsISupports.idl" 1.10 + 1.11 +/** 1.12 + * Interface for an object that wants to gather "random" 1.13 + * data to be used for entropy purposes. 1.14 + */ 1.15 +%{C++ 1.16 + 1.17 +/* 1.18 + * If anyone wants to collect the entropy distributed by the 1.19 + * event handler, they'll have to implement this CONTRACTID 1.20 + */ 1.21 +#define NS_ENTROPYCOLLECTOR_CONTRACTID "@mozilla.org/security/entropy;1" 1.22 +%} 1.23 +/* Buffer type - for passing random data to the entropy 1.24 + * collector. 1.25 + */ 1.26 +[ptr] native buffer(void); 1.27 + 1.28 +[uuid(6f883680-ab9d-11d4-9978-00b0d02354a0)] 1.29 +interface nsIEntropyCollector : nsISupports 1.30 +{ 1.31 + 1.32 + /** 1.33 + * Add the following bytes to the pool of data to be used 1.34 + * in gathering entropy. 1.35 + */ 1.36 + void randomUpdate(in buffer entropy, in long bufLen); 1.37 + 1.38 +};