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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 return parseRsaHashedImportParams(raw, params, context, error); | 643 return parseRsaHashedImportParams(raw, params, context, error); |
644 case WebCryptoAlgorithmParamsTypeAesCtrParams: | 644 case WebCryptoAlgorithmParamsTypeAesCtrParams: |
645 context.add("AesCtrParams"); | 645 context.add("AesCtrParams"); |
646 return parseAesCtrParams(raw, params, context, error); | 646 return parseAesCtrParams(raw, params, context, error); |
647 case WebCryptoAlgorithmParamsTypeAesGcmParams: | 647 case WebCryptoAlgorithmParamsTypeAesGcmParams: |
648 context.add("AesGcmParams"); | 648 context.add("AesGcmParams"); |
649 return parseAesGcmParams(raw, params, context, error); | 649 return parseAesGcmParams(raw, params, context, error); |
650 case WebCryptoAlgorithmParamsTypeRsaOaepParams: | 650 case WebCryptoAlgorithmParamsTypeRsaOaepParams: |
651 context.add("RsaOaepParams"); | 651 context.add("RsaOaepParams"); |
652 return parseRsaOaepParams(raw, params, context, error); | 652 return parseRsaOaepParams(raw, params, context, error); |
653 break; | |
654 case WebCryptoAlgorithmParamsTypeRsaPssParams: | 653 case WebCryptoAlgorithmParamsTypeRsaPssParams: |
655 context.add("RsaPssParams"); | 654 context.add("RsaPssParams"); |
656 return parseRsaPssParams(raw, params, context, error); | 655 return parseRsaPssParams(raw, params, context, error); |
657 break; | |
658 } | 656 } |
659 ASSERT_NOT_REACHED(); | 657 ASSERT_NOT_REACHED(); |
660 return false; | 658 return false; |
661 } | 659 } |
662 | 660 |
663 const char* operationToString(WebCryptoOperation op) | 661 const char* operationToString(WebCryptoOperation op) |
664 { | 662 { |
665 switch (op) { | 663 switch (op) { |
666 case WebCryptoOperationEncrypt: | 664 case WebCryptoOperationEncrypt: |
667 return "encrypt"; | 665 return "encrypt"; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 } | 732 } |
735 | 733 |
736 } // namespace | 734 } // namespace |
737 | 735 |
738 bool normalizeAlgorithm(const Dictionary& raw, WebCryptoOperation op, WebCryptoA
lgorithm& algorithm, AlgorithmError* error) | 736 bool normalizeAlgorithm(const Dictionary& raw, WebCryptoOperation op, WebCryptoA
lgorithm& algorithm, AlgorithmError* error) |
739 { | 737 { |
740 return parseAlgorithm(raw, op, algorithm, ErrorContext(), error); | 738 return parseAlgorithm(raw, op, algorithm, ErrorContext(), error); |
741 } | 739 } |
742 | 740 |
743 } // namespace blink | 741 } // namespace blink |
OLD | NEW |