зеркало из https://github.com/mozilla/pjs.git
54 строки
1.5 KiB
Plaintext
54 строки
1.5 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++
|
|
|
|
// Define CID {29a1d8b6-ac5a-11d4-9978-00b0d02354a0}
|
|
#define NS_ENTROPYCOLLECTOR_CID \
|
|
{ 0x29a1d8b6, 0xac5a, 0x11d4, \
|
|
{ 0x00, 0xb0, 0xd0, 0x23, 0x54, 0xa0 } }
|
|
|
|
/*
|
|
* 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);
|
|
|
|
};
|