WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

nsIStreamCipher

IID:1d507cd6-1630-4710-af1b-4012dbcc514c
Inherits From:nsISupports

Stream cipher interface. We're basically copying the interface from nsICryptoHash interface.

This interface is implemented by the following components:


Methods

void discard ( PRInt32 len ) ACString finish ( PRBool ASCII ) void init ( nsIKeyObject key ) void initWithIV ( nsIKeyObject key , arrayof PRUint8 IV , PRUint32 IVLen ) void update ( arrayof PRUint8 data , PRUint32 len ) void updateFromStream ( nsIInputStream stream , PRInt32 len ) void updateFromString ( ACString input )

void discard ( PRInt32 len )

Discard len 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.

Arguments:
len

ACString finish ( PRBool ASCII )

Arguments:
ASCII: if true then the returned value is a base-64 encoded string. if false, then the returned value is binary data.

void init ( nsIKeyObject key )

Initialize a stream cipher.

Arguments:
key: nsIKeyObject

void initWithIV ( nsIKeyObject key , arrayof PRUint8 IV , PRUint32 IVLen )

Initialize a stream cipher with an initialization vector.

Arguments:
key: nsIKeyObject
IV: the initialization vector
IVLen: the length of the initialization vector

void update ( arrayof PRUint8 data , PRUint32 len )

Update from an array of bytes.

Arguments:
data
len

void updateFromStream ( nsIInputStream stream , PRInt32 len )

Update from a stream.

Arguments:
stream
len

void updateFromString ( ACString input )

A more script friendly method (not in nsICryptoHash interface).

Arguments:
input

Reference documentation is generated from Mozilla's source.

Copyright © 1999-2006 XULPlanet.com