---
title: CryptoKey
summary: The CryptoKey dictionary of the Web Crypto API represents a cryptographic key. Available only in secure contexts.
url: https://www.fastly.com/documentation/reference/compute/sdks/javascript/js-compute/globals/interface.CryptoKey/
---

**Kind:** Interface  
**Module:** [globals](https://www.fastly.com/documentation/reference/compute/sdks/javascript/js-compute/globals/)  
**Package:** @fastly/js-compute 4.0.1  
**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L2406

The CryptoKey dictionary of the Web Crypto API represents a cryptographic key.
Available only in secure contexts.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey)

## Constructor

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L2419

```javascript
new CryptoKey()
```

## Properties

### algorithm

**Type:** `KeyAlgorithm`  
**Flags:** read-only  
**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L2408

[MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm)

### extractable

**Type:** `boolean`  
**Flags:** read-only  
**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L2410

[MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable)

### type

**Type:** `KeyType`  
**Flags:** read-only  
**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L2412

[MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type)

### usages

**Type:** `Array<KeyUsage>`  
**Flags:** read-only  
**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L2414

[MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages)
