|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /usr/share/idl/xulrunner-17.0.10/ |
Upload File : |
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsISupports.idl"
#include "nsIKeyModule.idl"
interface nsIInputStream;
/**
* Stream cipher interface. We're basically copying the interface from
* nsICryptoHash interface.
*/
[scriptable, uuid(1d507cd6-1630-4710-af1b-4012dbcc514c)]
interface nsIStreamCipher : nsISupports
{
/**
* Initialize a stream cipher.
* @param aKey nsIKeyObject
*/
void init(in nsIKeyObject aKey);
/**
* Initialize a stream cipher with an initialization vector.
* @param aKey nsIKeyObject
* @param aIV the initialization vector
* @param aIVLen the length of the initialization vector
*/
void initWithIV(in nsIKeyObject aKey,
[const, array, size_is(aIVLen)] in octet aIV,
in unsigned long aIVLen);
/**
* Update from an array of bytes.
*/
void update([const, array, size_is(aLen)] in octet aData, in unsigned long aLen);
/**
* Update from a stream.
*/
void updateFromStream(in nsIInputStream aStream, in long aLen);
/**
* A more script friendly method (not in nsICryptoHash interface).
*/
void updateFromString(in ACString aInput);
/**
* @param aASCII if true then the returned value is a base-64
* encoded string. if false, then the returned value is
* binary data.
*/
ACString finish(in boolean aASCII);
/**
* Discard aLen bytes of the keystream.
* These days 1536 is considered a decent amount to drop to get
* the key state warmed-up enough for secure usage.
*/
void discard(in long aLen);
};