Subject: Re: [boost] Message Hashing Interface (SHA-1/256/384/512, MD4/5)
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2010-04-10 12:16:24
On 10 April 2010 11:45, Daniel Trebbien <dtrebbien_at_[hidden]> wrote:
> one, minor suggestion: why not name `end_message` simply `end`?
> I am of the opinion that naming should follow the language's standard
> library conventions closely. And, as the STL uses short, concise
> member function names, it is best to mimic this.
I picked that one thinking of the ASCII control codes END OF
TEXT/TRANSMISSION/MEDIUM and the email convention of <eom>. And I
realize it's not a member function, but STL isn't afraid of calling
something lexicographical_compare if it needs to.
As part of the http://en.wikipedia.org/wiki/Merkle%E2%80%93Damg%C3%A5rd_construction
it's called "Finalization", and most precedents seem to use something
like that. Crypto++ calls it "Final", the MD5 reference
implementation uses "MD5Final", and the implementation provided for
the "best understood" (according to NIST) SHA-3 candidate CubeHash
(http://cubehash.cr.yp.to/simple.c) also calls it Final.
To get an actual verb, I guess the most logical name would be
"finalize()", but I suppose most libraries can't use that since their
GC stole the name.