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

Side by Side Diff: Source/bindings/v8/custom/V8AlgorithmCustom.cpp

Issue 26426002: [webcrypto] Add parameters for AES-GCM and RSA-OAEP to blink API. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 19 matching lines...) Expand all
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "V8Algorithm.h" 32 #include "V8Algorithm.h"
33 33
34 #include "V8AesCbcParams.h" 34 #include "V8AesCbcParams.h"
35 #include "V8AesKeyGenParams.h" 35 #include "V8AesKeyGenParams.h"
36 #include "V8HmacKeyParams.h" 36 #include "V8HmacKeyParams.h"
37 #include "V8HmacParams.h" 37 #include "V8HmacParams.h"
38 #include "V8RsaKeyGenParams.h" 38 #include "V8RsaKeyGenParams.h"
39 #include "V8RsaSsaParams.h" 39 #include "V8RsaSsaParams.h"
40 #include "platform/NotImplemented.h"
40 41
41 namespace WebCore { 42 namespace WebCore {
42 43
43 v8::Handle<v8::Object> wrap(Algorithm* impl, v8::Handle<v8::Object> creationCont ext, v8::Isolate* isolate) 44 v8::Handle<v8::Object> wrap(Algorithm* impl, v8::Handle<v8::Object> creationCont ext, v8::Isolate* isolate)
44 { 45 {
45 ASSERT(impl); 46 ASSERT(impl);
46 47
47 // Wrap as the more derived type. 48 // Wrap as the more derived type.
48 switch (impl->type()) { 49 switch (impl->type()) {
49 case WebKit::WebCryptoAlgorithmParamsTypeNone: 50 case WebKit::WebCryptoAlgorithmParamsTypeNone:
50 return V8Algorithm::createWrapper(impl, creationContext, isolate); 51 return V8Algorithm::createWrapper(impl, creationContext, isolate);
51 case WebKit::WebCryptoAlgorithmParamsTypeAesCbcParams: 52 case WebKit::WebCryptoAlgorithmParamsTypeAesCbcParams:
52 return wrap(static_cast<AesCbcParams*>(impl), creationContext, isolate); 53 return wrap(static_cast<AesCbcParams*>(impl), creationContext, isolate);
53 case WebKit::WebCryptoAlgorithmParamsTypeAesKeyGenParams: 54 case WebKit::WebCryptoAlgorithmParamsTypeAesKeyGenParams:
54 return wrap(static_cast<AesKeyGenParams*>(impl), creationContext, isolat e); 55 return wrap(static_cast<AesKeyGenParams*>(impl), creationContext, isolat e);
55 case WebKit::WebCryptoAlgorithmParamsTypeHmacParams: 56 case WebKit::WebCryptoAlgorithmParamsTypeHmacParams:
56 return wrap(static_cast<HmacParams*>(impl), creationContext, isolate); 57 return wrap(static_cast<HmacParams*>(impl), creationContext, isolate);
57 case WebKit::WebCryptoAlgorithmParamsTypeHmacKeyParams: 58 case WebKit::WebCryptoAlgorithmParamsTypeHmacKeyParams:
58 return wrap(static_cast<HmacKeyParams*>(impl), creationContext, isolate) ; 59 return wrap(static_cast<HmacKeyParams*>(impl), creationContext, isolate) ;
59 case WebKit::WebCryptoAlgorithmParamsTypeRsaSsaParams: 60 case WebKit::WebCryptoAlgorithmParamsTypeRsaSsaParams:
60 return wrap(static_cast<RsaSsaParams*>(impl), creationContext, isolate); 61 return wrap(static_cast<RsaSsaParams*>(impl), creationContext, isolate);
61 case WebKit::WebCryptoAlgorithmParamsTypeRsaKeyGenParams: 62 case WebKit::WebCryptoAlgorithmParamsTypeRsaKeyGenParams:
62 return wrap(static_cast<RsaKeyGenParams*>(impl), creationContext, isolat e); 63 return wrap(static_cast<RsaKeyGenParams*>(impl), creationContext, isolat e);
64 case WebKit::WebCryptoAlgorithmParamsTypeAesGcmParams:
65 case WebKit::WebCryptoAlgorithmParamsTypeRsaOaepParams:
66 // TODO
67 notImplemented();
68 break;
63 } 69 }
64 70
65 ASSERT_NOT_REACHED(); 71 ASSERT_NOT_REACHED();
66 return v8::Handle<v8::Object>(); 72 return v8::Handle<v8::Object>();
67 } 73 }
68 74
69 } // namespace WebCore 75 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698