Linux Mac OSX Windows

Implemented by

 Stream cipher interface.  We're basically copying the interface from
 nsICryptoHash interface.
[scriptable, uuid(1d507cd6-1630-4710-af1b-4012dbcc514c)]
interface nsIStreamCipher : nsISupports

Methods

 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)
 @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 PRBool aASCII)
 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)