| OLD | NEW |
| 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 17 matching lines...) Expand all Loading... |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "modules/crypto/Algorithm.h" | 32 #include "modules/crypto/Algorithm.h" |
| 33 | 33 |
| 34 #include "modules/crypto/AesCbcParams.h" | 34 #include "modules/crypto/AesCbcParams.h" |
| 35 #include "modules/crypto/AesKeyGenParams.h" | 35 #include "modules/crypto/AesKeyGenParams.h" |
| 36 #include "modules/crypto/HmacKeyParams.h" | 36 #include "modules/crypto/HmacKeyParams.h" |
| 37 #include "modules/crypto/HmacParams.h" | 37 #include "modules/crypto/HmacParams.h" |
| 38 #include "modules/crypto/NormalizeAlgorithm.h" |
| 38 #include "modules/crypto/RsaKeyGenParams.h" | 39 #include "modules/crypto/RsaKeyGenParams.h" |
| 39 #include "modules/crypto/RsaSsaParams.h" | 40 #include "modules/crypto/RsaSsaParams.h" |
| 40 #include "wtf/text/WTFString.h" | 41 #include "wtf/text/WTFString.h" |
| 41 | 42 |
| 42 namespace WebCore { | 43 namespace WebCore { |
| 43 | 44 |
| 44 PassRefPtr<Algorithm> Algorithm::create(const WebKit::WebCryptoAlgorithm& algori
thm) | 45 PassRefPtr<Algorithm> Algorithm::create(const WebKit::WebCryptoAlgorithm& algori
thm) |
| 45 { | 46 { |
| 46 switch (algorithm.paramsType()) { | 47 switch (algorithm.paramsType()) { |
| 47 case WebKit::WebCryptoAlgorithmParamsTypeNone: | 48 case WebKit::WebCryptoAlgorithmParamsTypeNone: |
| (...skipping 16 matching lines...) Expand all Loading... |
| 64 } | 65 } |
| 65 | 66 |
| 66 Algorithm::Algorithm(const WebKit::WebCryptoAlgorithm& algorithm) | 67 Algorithm::Algorithm(const WebKit::WebCryptoAlgorithm& algorithm) |
| 67 : m_algorithm(algorithm) | 68 : m_algorithm(algorithm) |
| 68 { | 69 { |
| 69 ScriptWrappable::init(this); | 70 ScriptWrappable::init(this); |
| 70 } | 71 } |
| 71 | 72 |
| 72 String Algorithm::name() | 73 String Algorithm::name() |
| 73 { | 74 { |
| 74 return m_algorithm.name(); | 75 return algorithmIdToName(m_algorithm.id()); |
| 75 } | 76 } |
| 76 | 77 |
| 77 } // namespace WebCore | 78 } // namespace WebCore |
| OLD | NEW |