File
Blob: src/workerd/api/crypto/jwk.h
| 1 | #pragma once |
| 2 | |
| 3 | #include "keys.h" |
| 4 | |
| 5 | namespace workerd::api { |
| 6 | |
| 7 | // TODO(soon): All of the JWK conversion logic will be moved in here |
| 8 | // soon. Currently this only covers conversion with ncrypto keys not |
| 9 | // kj::Own held keys. |
| 10 | |
| 11 | SubtleCrypto::JsonWebKey toJwk( |
| 12 | const ncrypto::EVPKeyPointer& key, KeyType keyType = KeyType::PUBLIC); |
| 13 | |
| 14 | ncrypto::EVPKeyPointer fromJwk( |
| 15 | const SubtleCrypto::JsonWebKey& jwk, KeyType keyType = KeyType::PUBLIC); |
| 16 | |
| 17 | } // namespace workerd::api |