Commit Graph

5 Commits

Author SHA1 Message Date
Clinton Stimpson 5730710c86 Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.
Also use SystemTools::Fopen() instead of fopen().
This is to eventually support utf-8 filenames.
2014-01-07 09:27:44 -05:00
Brad King 75994d953e cmCryptoHash: Increase alignment of HashFile buffer
The SHA512_Update implementation accesses input data via 64-bit
integers.  This requires alignment of the input buffer on some
architectures.  Align our stack-allocated buffer for file content to
satisfy this requirement.
2013-06-13 08:40:10 -04:00
Brad King 293a7f4e2a cmCryptoHash: Provide factory "New" method
Construct a cmCryptoHash subclass instance based on the name of the
desired hash algorithm.
2011-11-16 10:15:44 -05:00
Brad King 38771d3bdf Add file(SHA*) commands to compute cryptographic hashes
Add a file() command API for SHA1, SHA224, SHA256, SHA384, and SHA512.
2011-11-16 10:15:44 -05:00
Brad King ed7cef5634 Factor Compute(File|String)MD5 into cmCryptoHash helper
Define an abstract API around the backend hash algorithm.  Expose
ifstream errors to HashFile callers.  Always try opening the file.
Succeed only if the end of file is reached without error.
2011-11-16 10:14:53 -05:00