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 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 switch (type) { | 616 switch (type) { |
617 case blink::WebCryptoAlgorithmParamsTypeNone: | 617 case blink::WebCryptoAlgorithmParamsTypeNone: |
618 return true; | 618 return true; |
619 case blink::WebCryptoAlgorithmParamsTypeAesCbcParams: | 619 case blink::WebCryptoAlgorithmParamsTypeAesCbcParams: |
620 context.add("AesCbcParams"); | 620 context.add("AesCbcParams"); |
621 return parseAesCbcParams(raw, params, context, errorDetails); | 621 return parseAesCbcParams(raw, params, context, errorDetails); |
622 case blink::WebCryptoAlgorithmParamsTypeAesKeyGenParams: | 622 case blink::WebCryptoAlgorithmParamsTypeAesKeyGenParams: |
623 context.add("AesKeyGenParams"); | 623 context.add("AesKeyGenParams"); |
624 return parseAesKeyGenParams(raw, params, context, errorDetails); | 624 return parseAesKeyGenParams(raw, params, context, errorDetails); |
625 case blink::WebCryptoAlgorithmParamsTypeHmacImportParams: | 625 case blink::WebCryptoAlgorithmParamsTypeHmacImportParams: |
626 context.add("HmacImporParams"); | 626 context.add("HmacImportParams"); |
627 return parseHmacImportParams(raw, params, context, errorDetails); | 627 return parseHmacImportParams(raw, params, context, errorDetails); |
628 case blink::WebCryptoAlgorithmParamsTypeHmacKeyGenParams: | 628 case blink::WebCryptoAlgorithmParamsTypeHmacKeyGenParams: |
629 context.add("HmacKeyGenParams"); | 629 context.add("HmacKeyGenParams"); |
630 return parseHmacKeyGenParams(raw, params, context, errorDetails); | 630 return parseHmacKeyGenParams(raw, params, context, errorDetails); |
631 case blink::WebCryptoAlgorithmParamsTypeRsaHashedKeyGenParams: | 631 case blink::WebCryptoAlgorithmParamsTypeRsaHashedKeyGenParams: |
632 context.add("RsaHashedKeyGenParams"); | 632 context.add("RsaHashedKeyGenParams"); |
633 return parseRsaHashedKeyGenParams(raw, params, context, errorDetails); | 633 return parseRsaHashedKeyGenParams(raw, params, context, errorDetails); |
634 case blink::WebCryptoAlgorithmParamsTypeRsaHashedImportParams: | 634 case blink::WebCryptoAlgorithmParamsTypeRsaHashedImportParams: |
635 context.add("RsaHashedImportParams"); | 635 context.add("RsaHashedImportParams"); |
636 return parseRsaHashedImportParams(raw, params, context, errorDetails); | 636 return parseRsaHashedImportParams(raw, params, context, errorDetails); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 } | 700 } |
701 return true; | 701 return true; |
702 } | 702 } |
703 | 703 |
704 const char* algorithmIdToName(blink::WebCryptoAlgorithmId id) | 704 const char* algorithmIdToName(blink::WebCryptoAlgorithmId id) |
705 { | 705 { |
706 return AlgorithmRegistry::instance().lookupAlgorithmById(id)->algorithmName; | 706 return AlgorithmRegistry::instance().lookupAlgorithmById(id)->algorithmName; |
707 } | 707 } |
708 | 708 |
709 } // namespace WebCore | 709 } // namespace WebCore |
OLD | NEW |