Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "nsISupports.idl" |
michael@0 | 7 | |
michael@0 | 8 | /** |
michael@0 | 9 | * Interface for an object that wants to gather "random" |
michael@0 | 10 | * data to be used for entropy purposes. |
michael@0 | 11 | */ |
michael@0 | 12 | %{C++ |
michael@0 | 13 | |
michael@0 | 14 | /* |
michael@0 | 15 | * If anyone wants to collect the entropy distributed by the |
michael@0 | 16 | * event handler, they'll have to implement this CONTRACTID |
michael@0 | 17 | */ |
michael@0 | 18 | #define NS_ENTROPYCOLLECTOR_CONTRACTID "@mozilla.org/security/entropy;1" |
michael@0 | 19 | %} |
michael@0 | 20 | /* Buffer type - for passing random data to the entropy |
michael@0 | 21 | * collector. |
michael@0 | 22 | */ |
michael@0 | 23 | [ptr] native buffer(void); |
michael@0 | 24 | |
michael@0 | 25 | [uuid(6f883680-ab9d-11d4-9978-00b0d02354a0)] |
michael@0 | 26 | interface nsIEntropyCollector : nsISupports |
michael@0 | 27 | { |
michael@0 | 28 | |
michael@0 | 29 | /** |
michael@0 | 30 | * Add the following bytes to the pool of data to be used |
michael@0 | 31 | * in gathering entropy. |
michael@0 | 32 | */ |
michael@0 | 33 | void randomUpdate(in buffer entropy, in long bufLen); |
michael@0 | 34 | |
michael@0 | 35 | }; |