michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 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 michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: /** michael@0: * Interface for an object that wants to gather "random" michael@0: * data to be used for entropy purposes. michael@0: */ michael@0: %{C++ michael@0: michael@0: /* michael@0: * If anyone wants to collect the entropy distributed by the michael@0: * event handler, they'll have to implement this CONTRACTID michael@0: */ michael@0: #define NS_ENTROPYCOLLECTOR_CONTRACTID "@mozilla.org/security/entropy;1" michael@0: %} michael@0: /* Buffer type - for passing random data to the entropy michael@0: * collector. michael@0: */ michael@0: [ptr] native buffer(void); michael@0: michael@0: [uuid(6f883680-ab9d-11d4-9978-00b0d02354a0)] michael@0: interface nsIEntropyCollector : nsISupports michael@0: { michael@0: michael@0: /** michael@0: * Add the following bytes to the pool of data to be used michael@0: * in gathering entropy. michael@0: */ michael@0: void randomUpdate(in buffer entropy, in long bufLen); michael@0: michael@0: };