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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // * Returned pointer's lifetime is bound to |this| | 113 // * Returned pointer's lifetime is bound to |this| |
114 BLINK_PLATFORM_EXPORT WebCryptoKeyHandle* handle() const; | 114 BLINK_PLATFORM_EXPORT WebCryptoKeyHandle* handle() const; |
115 | 115 |
116 BLINK_PLATFORM_EXPORT WebCryptoKeyType type() const; | 116 BLINK_PLATFORM_EXPORT WebCryptoKeyType type() const; |
117 BLINK_PLATFORM_EXPORT bool extractable() const; | 117 BLINK_PLATFORM_EXPORT bool extractable() const; |
118 BLINK_PLATFORM_EXPORT const WebCryptoKeyAlgorithm& algorithm() const; | 118 BLINK_PLATFORM_EXPORT const WebCryptoKeyAlgorithm& algorithm() const; |
119 BLINK_PLATFORM_EXPORT WebCryptoKeyUsageMask usages() const; | 119 BLINK_PLATFORM_EXPORT WebCryptoKeyUsageMask usages() const; |
120 | 120 |
121 BLINK_PLATFORM_EXPORT bool isNull() const; | 121 BLINK_PLATFORM_EXPORT bool isNull() const; |
122 | 122 |
| 123 BLINK_PLATFORM_EXPORT bool keyUsageAllows(const blink::WebCryptoKeyUsage) co
nst; |
| 124 |
123 private: | 125 private: |
124 BLINK_PLATFORM_EXPORT void assign(const WebCryptoKey& other); | 126 BLINK_PLATFORM_EXPORT void assign(const WebCryptoKey& other); |
125 BLINK_PLATFORM_EXPORT void reset(); | 127 BLINK_PLATFORM_EXPORT void reset(); |
126 | 128 |
127 WebPrivatePtr<WebCryptoKeyPrivate> m_private; | 129 WebPrivatePtr<WebCryptoKeyPrivate> m_private; |
128 }; | 130 }; |
129 | 131 |
130 // Base class for the embedder to define its own opaque key handle. The lifetime | 132 // Base class for the embedder to define its own opaque key handle. The lifetime |
131 // of this object is controlled by WebCryptoKey using reference counting. | 133 // of this object is controlled by WebCryptoKey using reference counting. |
132 class WebCryptoKeyHandle { | 134 class WebCryptoKeyHandle { |
133 public: | 135 public: |
134 virtual ~WebCryptoKeyHandle() { } | 136 virtual ~WebCryptoKeyHandle() { } |
135 }; | 137 }; |
136 | 138 |
137 } // namespace blink | 139 } // namespace blink |
138 | 140 |
139 #endif | 141 #endif |
OLD | NEW |