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

Unified Diff: public/platform/WebCryptoAlgorithmParams.h

Issue 23455017: Refactor how "length" parameter is obtained for HmacKeyParams. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
« no previous file with comments | « Source/modules/crypto/HmacKeyParams.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebCryptoAlgorithmParams.h
diff --git a/public/platform/WebCryptoAlgorithmParams.h b/public/platform/WebCryptoAlgorithmParams.h
index c18187591bd29df6d732b3c6bf3acd8a38291a93..7562ce497c565331954a9e305aa1a0ee1ab389b4 100644
--- a/public/platform/WebCryptoAlgorithmParams.h
+++ b/public/platform/WebCryptoAlgorithmParams.h
@@ -115,16 +115,18 @@ public:
bool hasLength() const { return m_hasLength; }
- unsigned length() const
+ bool getLength(unsigned& length) const
{
- WEBKIT_ASSERT(m_length);
- return m_length;
+ if (!m_hasLength)
+ return false;
+ length = m_length;
+ return true;
}
private:
WebCryptoAlgorithm m_hash;
bool m_hasLength;
- int m_length;
+ unsigned m_length;
};
class WebCryptoRsaSsaParams : public WebCryptoAlgorithmParams {
« no previous file with comments | « Source/modules/crypto/HmacKeyParams.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698