Andrew Taylor wrote:
> Does anyone know the best way to generate an md5 digest in mailnews? I
> see two instances where it is done:
>
> - in mailnews/imap/src/nsImapProtocol.cpp, there is a reference to
> loading an md5 algorithm through nsIKeyedHashAlgorithm; it is #ifdefed
> out though, and nsIKeyedHashAlgorithm.{h,idl} isn't in the source tree,
> so I assume this is something that was started and not finished, or
> something pulled out due to cryptographic political concerns
the md5 digest code lives in PSM. If I remember correctly, mscott added
that code when he implemented the CRAM imap extentsion.
the were some performance problem when going out of process (to PSM) to
do the hash, and there were problems with
how to handle CRAM when PSM was not installed. I think that is why he
turned that code off.
mscott, please correct me if I am wrong.
> - in mailnews/base/src/nsMsgMD5.cpp, there is an implementation; it
> looks like this one is special purpose though, and there isn't an
> interface to access it from other components
>
> So what is the recommended way to create a digest? Should I go ahead
> and create nsIMsgMD5.idl? Is nsIKeyedHashAlgorithm eventually going to
> make it back into the tree?
mscott would be the best person to answer that.
-Seth