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.

@mozilla.org/security/hash;1

This component implements the following interfaces:

Constants

Hashing Algorithms. These values are to be used by the init method to indicate which hashing function to use. These values map directly onto the values defined in mozilla/security/nss/lib/cryptohi/hasht.h.
PRInt16 nsICryptoHash.MD2 = 1
PRInt16 nsICryptoHash.MD5 = 2
PRInt16 nsICryptoHash.SHA1 = 3
PRInt16 nsICryptoHash.SHA256 = 4
PRInt16 nsICryptoHash.SHA384 = 5
PRInt16 nsICryptoHash.SHA512 = 6

Methods

InterfaceMethod
nsICryptoHash ACString finish ( PRBool ASCII )
nsICryptoHash void init ( PRUint32 algorithm )
nsICryptoHash void initWithString ( ACString algorithm )
nsICryptoHash void update ( arrayof PRUint8 data , PRUint32 len )
nsICryptoHash void updateFromStream ( nsIInputStream stream , PRUint32 len )

Reference documentation is generated from Mozilla's source.

Copyright © 1999-2006 XULPlanet.com