Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2324)

Unified Diff: crypto/sha2.h

Issue 7823004: Convert SHA256_LENGTH from a constant-in-anonymous-enum to a static const. This defines the cons... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: crypto/sha2.h
===================================================================
--- crypto/sha2.h (revision 98481)
+++ crypto/sha2.h (working copy)
@@ -16,9 +16,7 @@
//
// Functions for SHA-384 and SHA-512 can be added when the need arises.
-enum {
- SHA256_LENGTH = 32 // length in bytes of a SHA-256 hash
-};
+static const size_t kSHA256Length = 32; // length in bytes of a SHA-256 hash
wtc 2011/09/02 17:08:42 Question: is the 'static' necessary?
// Computes the SHA-256 hash of the input string 'str' and stores the first
// 'len' bytes of the hash in the output buffer 'output'. If 'len' > 32,

Powered by Google App Engine
This is Rietveld 408576698