Request from https://bugs.webkit.org/show_bug.cgi?id=125345 Use std::array for hash instead of custom Vector implementation.
Created attachment 218752 [details] Patch
Comment on attachment 218752 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=218752&action=review > Source/WTF/wtf/SHA1.h:61 > + // Size of the SHA1 hash > + WTF_EXPORT_PRIVATE static const size_t hashSize = 20; how about we add typedef std::array<uint8_t, hashSize> Digest; here - then we don’t have to use hashSize everywhere. Patch looks good otherwise.
Created attachment 218798 [details] Patch
Thanks for the improvement, also removed some obsolete comments from SHA1.h
Comment on attachment 218798 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=218798&action=review > Source/WTF/wtf/SHA1.cpp:95 > + // array not initialized, need to update all positions True, yet not really a helpful comment. Nor in the format we use for comments in WebKit.
Right; I wrote that comment when digest.clear() was deleted. Is it better to remove it?
(In reply to comment #6) > Right; I wrote that comment when digest.clear() was deleted. Is it better to remove it? I think it would be slightly better, yes.
Created attachment 218799 [details] Patch
Comment on attachment 218799 [details] Patch Attachment 218799 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/47268185
Comment on attachment 218799 [details] Patch Attachment 218799 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/47248208
Comment on attachment 218799 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=218799&action=review > Source/WTF/wtf/SHA1.h:64 > + WTF_EXPORT_PRIVATE typedef std::array<uint8_t, hashSize> Digest; There’s no need to export a typedef, and that’s what caused the build failure. Remove this WTF_EXPORT_PRIVATE.
Comment on attachment 218799 [details] Patch Attachment 218799 [details] did not pass win-ews (win): Output: http://webkit-queues.appspot.com/results/47248212
Created attachment 218806 [details] Patch
Could someone take a quick look at the final version of the patch?
Comment on attachment 218806 [details] Patch Clearing flags on attachment: 218806 Committed r160456: <http://trac.webkit.org/changeset/160456>
All reviewed patches have been landed. Closing bug.