зеркало из https://github.com/mozilla/gecko-dev.git
49 строки
1.3 KiB
Plaintext
49 строки
1.3 KiB
Plaintext
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||
|
/*
|
||
|
* The contents of this file are subject to the Mozilla Public
|
||
|
* License Version 1.1 (the "License"); you may not use this file
|
||
|
* except in compliance with the License. You may obtain a copy of
|
||
|
* the License at http://www.mozilla.org/MPL/
|
||
|
*
|
||
|
* Software distributed under the License is distributed on an "AS
|
||
|
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||
|
* implied. See the License for the specific language governing
|
||
|
* rights and limitations under the License.
|
||
|
*
|
||
|
* The Original Code is Mozilla code.
|
||
|
*
|
||
|
* Contributor(s):
|
||
|
* Javier Delgadillo <javi@netscape.com>
|
||
|
*/
|
||
|
|
||
|
#include "nsISupports.idl"
|
||
|
|
||
|
/**
|
||
|
* Interface for an object that wants to gather "random"
|
||
|
* data to be used for entropy purposes.
|
||
|
*/
|
||
|
%{C++
|
||
|
|
||
|
/*
|
||
|
* If anyone wants to collect the entropy distributed by the
|
||
|
* event handler, they'll have to implement this CONTRACTID
|
||
|
*/
|
||
|
#define NS_ENTROPYCOLLECTOR_CONTRACTID "@mozilla.org/security/entropy;1"
|
||
|
%}
|
||
|
/* Buffer type - for passing random data to the entropy
|
||
|
* collector.
|
||
|
*/
|
||
|
[ptr] native buffer(void);
|
||
|
|
||
|
[uuid(6f883680-ab9d-11d4-9978-00b0d02354a0)]
|
||
|
interface nsIEntropyCollector : nsISupports
|
||
|
{
|
||
|
|
||
|
/**
|
||
|
* Add the following bytes to the pool of data to be used
|
||
|
* in gathering entropy.
|
||
|
*/
|
||
|
void randomUpdate(in buffer entropy, in long bufLen);
|
||
|
|
||
|
};
|