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

Unified Diff: content/renderer/webcrypto/webcrypto_impl.cc

Issue 171503006: [style] Run webcrypto files through clang-format. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 10 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 | « content/renderer/webcrypto/webcrypto_impl.h ('k') | content/renderer/webcrypto/webcrypto_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/webcrypto/webcrypto_impl.cc
diff --git a/content/renderer/webcrypto/webcrypto_impl.cc b/content/renderer/webcrypto/webcrypto_impl.cc
index d940378b906dd163a381101a525741bf40e890eb..4cb77d58bea9024b63a25c23465ba2ce631f7bc7 100644
--- a/content/renderer/webcrypto/webcrypto_impl.cc
+++ b/content/renderer/webcrypto/webcrypto_impl.cc
@@ -32,21 +32,17 @@ bool IsAlgorithmAsymmetric(const blink::WebCryptoAlgorithm& algorithm) {
algorithm.id() == blink::WebCryptoAlgorithmIdRsaOaep);
}
-
} // namespace
-WebCryptoImpl::WebCryptoImpl() {
- webcrypto::Init();
-}
+WebCryptoImpl::WebCryptoImpl() { webcrypto::Init(); }
WebCryptoImpl::~WebCryptoImpl() {}
-void WebCryptoImpl::encrypt(
- const blink::WebCryptoAlgorithm& algorithm,
- const blink::WebCryptoKey& key,
- const unsigned char* data,
- unsigned int data_size,
- blink::WebCryptoResult result) {
+void WebCryptoImpl::encrypt(const blink::WebCryptoAlgorithm& algorithm,
+ const blink::WebCryptoKey& key,
+ const unsigned char* data,
+ unsigned int data_size,
+ blink::WebCryptoResult result) {
DCHECK(!algorithm.isNull());
blink::WebArrayBuffer buffer;
Status status = webcrypto::Encrypt(
@@ -57,12 +53,11 @@ void WebCryptoImpl::encrypt(
result.completeWithBuffer(buffer);
}
-void WebCryptoImpl::decrypt(
- const blink::WebCryptoAlgorithm& algorithm,
- const blink::WebCryptoKey& key,
- const unsigned char* data,
- unsigned int data_size,
- blink::WebCryptoResult result) {
+void WebCryptoImpl::decrypt(const blink::WebCryptoAlgorithm& algorithm,
+ const blink::WebCryptoKey& key,
+ const unsigned char* data,
+ unsigned int data_size,
+ blink::WebCryptoResult result) {
DCHECK(!algorithm.isNull());
blink::WebArrayBuffer buffer;
Status status = webcrypto::Decrypt(
@@ -73,11 +68,10 @@ void WebCryptoImpl::decrypt(
result.completeWithBuffer(buffer);
}
-void WebCryptoImpl::digest(
- const blink::WebCryptoAlgorithm& algorithm,
- const unsigned char* data,
- unsigned int data_size,
- blink::WebCryptoResult result) {
+void WebCryptoImpl::digest(const blink::WebCryptoAlgorithm& algorithm,
+ const unsigned char* data,
+ unsigned int data_size,
+ blink::WebCryptoResult result) {
DCHECK(!algorithm.isNull());
blink::WebArrayBuffer buffer;
Status status = webcrypto::Digest(
@@ -88,11 +82,10 @@ void WebCryptoImpl::digest(
result.completeWithBuffer(buffer);
}
-void WebCryptoImpl::generateKey(
- const blink::WebCryptoAlgorithm& algorithm,
- bool extractable,
- blink::WebCryptoKeyUsageMask usage_mask,
- blink::WebCryptoResult result) {
+void WebCryptoImpl::generateKey(const blink::WebCryptoAlgorithm& algorithm,
+ bool extractable,
+ blink::WebCryptoKeyUsageMask usage_mask,
+ blink::WebCryptoResult result) {
DCHECK(!algorithm.isNull());
if (IsAlgorithmAsymmetric(algorithm)) {
blink::WebCryptoKey public_key = blink::WebCryptoKey::createNull();
@@ -154,10 +147,9 @@ void WebCryptoImpl::importKey(
}
}
-void WebCryptoImpl::exportKey(
- blink::WebCryptoKeyFormat format,
- const blink::WebCryptoKey& key,
- blink::WebCryptoResult result) {
+void WebCryptoImpl::exportKey(blink::WebCryptoKeyFormat format,
+ const blink::WebCryptoKey& key,
+ blink::WebCryptoResult result) {
blink::WebArrayBuffer buffer;
Status status = webcrypto::ExportKey(format, key, &buffer);
if (status.IsError())
@@ -166,12 +158,11 @@ void WebCryptoImpl::exportKey(
result.completeWithBuffer(buffer);
}
-void WebCryptoImpl::sign(
- const blink::WebCryptoAlgorithm& algorithm,
- const blink::WebCryptoKey& key,
- const unsigned char* data,
- unsigned int data_size,
- blink::WebCryptoResult result) {
+void WebCryptoImpl::sign(const blink::WebCryptoAlgorithm& algorithm,
+ const blink::WebCryptoKey& key,
+ const unsigned char* data,
+ unsigned int data_size,
+ blink::WebCryptoResult result) {
DCHECK(!algorithm.isNull());
blink::WebArrayBuffer buffer;
Status status = webcrypto::Sign(
@@ -182,14 +173,13 @@ void WebCryptoImpl::sign(
result.completeWithBuffer(buffer);
}
-void WebCryptoImpl::verifySignature(
- const blink::WebCryptoAlgorithm& algorithm,
- const blink::WebCryptoKey& key,
- const unsigned char* signature,
- unsigned int signature_size,
- const unsigned char* data,
- unsigned int data_size,
- blink::WebCryptoResult result) {
+void WebCryptoImpl::verifySignature(const blink::WebCryptoAlgorithm& algorithm,
+ const blink::WebCryptoKey& key,
+ const unsigned char* signature,
+ unsigned int signature_size,
+ const unsigned char* data,
+ unsigned int data_size,
+ blink::WebCryptoResult result) {
DCHECK(!algorithm.isNull());
bool signature_match = false;
Status status = webcrypto::VerifySignature(
« no previous file with comments | « content/renderer/webcrypto/webcrypto_impl.h ('k') | content/renderer/webcrypto/webcrypto_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698