| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 WebCryptoKeyUsageWrapKey = 1 << 5, | 51 WebCryptoKeyUsageWrapKey = 1 << 5, |
| 52 WebCryptoKeyUsageUnwrapKey = 1 << 6, | 52 WebCryptoKeyUsageUnwrapKey = 1 << 6, |
| 53 #if WEBKIT_IMPLEMENTATION | 53 #if WEBKIT_IMPLEMENTATION |
| 54 EndOfWebCryptoKeyUsage, | 54 EndOfWebCryptoKeyUsage, |
| 55 #endif | 55 #endif |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 // A bitfield of WebCryptoKeyUsage | 58 // A bitfield of WebCryptoKeyUsage |
| 59 typedef int WebCryptoKeyUsageMask; | 59 typedef int WebCryptoKeyUsageMask; |
| 60 | 60 |
| 61 enum WebCryptoKeyFormat { |
| 62 WebCryptoKeyFormatRaw, |
| 63 WebCryptoKeyFormatPkcs8, |
| 64 WebCryptoKeyFormatSpki, |
| 65 WebCryptoKeyFormatJwk, |
| 66 }; |
| 67 |
| 61 class WebCryptoAlgorithm; | 68 class WebCryptoAlgorithm; |
| 62 class WebCryptoKeyPrivate; | 69 class WebCryptoKeyPrivate; |
| 63 class WebCryptoKeyHandle; | 70 class WebCryptoKeyHandle; |
| 64 | 71 |
| 65 // The WebCryptoKey represents a key from the Web Crypto API: | 72 // The WebCryptoKey represents a key from the Web Crypto API: |
| 66 // | 73 // |
| 67 // https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#key-inte
rface | 74 // https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#key-inte
rface |
| 68 // | 75 // |
| 69 // WebCryptoKey is just a reference-counted wrapper that manages the lifetime of | 76 // WebCryptoKey is just a reference-counted wrapper that manages the lifetime of |
| 70 // a "WebCryptoKeyHandle*". | 77 // a "WebCryptoKeyHandle*". |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 // Base class for the embedder to define its own opaque key handle. The lifetime | 126 // Base class for the embedder to define its own opaque key handle. The lifetime |
| 120 // of this object is controlled by WebCryptoKey using reference counting. | 127 // of this object is controlled by WebCryptoKey using reference counting. |
| 121 class WebCryptoKeyHandle { | 128 class WebCryptoKeyHandle { |
| 122 public: | 129 public: |
| 123 virtual ~WebCryptoKeyHandle() { } | 130 virtual ~WebCryptoKeyHandle() { } |
| 124 }; | 131 }; |
| 125 | 132 |
| 126 } // namespace WebKit | 133 } // namespace WebKit |
| 127 | 134 |
| 128 #endif | 135 #endif |
| OLD | NEW |