Skip to content

Commit 3ea0ab7

Browse files
committed
webcrypto: experimental deprication notice
1 parent d75c03a commit 3ea0ab7

30 files changed

+76
-21
lines changed

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/_index.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
---
22
title: 'webcrypto'
3-
description: "k6 webcrypto experimental API"
4-
weight: 06
3+
description: 'k6 webcrypto experimental API'
54
weight: 06
65
---
76

87
# webcrypto
98

10-
{{< docs/shared source="k6" lookup="experimental-module.md" version="<K6_VERSION>" >}}
9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
1110

1211
With this experimental module, you can use the [WebCrypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) in your k6 scripts. However, note that this API is not yet fully implemented and some algorithms and features might still be missing.
1312

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/aescbcparams.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ weight: 04
66

77
# AesCbcParams
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
The `AesCbcParams` object represents the object that should be passed as the algorithm parameter into the [encrypt](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/subtlecrypto/encrypt) and [decrypt](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/subtlecrypto/decrypt) operation when using the AES-CBC algorithm.
1012

1113
For more details, head to the [MDN Web Crypto API documentation on AES-CBC](https://developer.mozilla.org/en-US/docs/Web/API/AesCbcParams).

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/aesctrparams.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ weight: 05
66

77
# AesCtrParams
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
The `AesCtrParams` object represents the object that should be passed as the algorithm parameter into the [encrypt](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/subtlecrypto/encrypt) and [decrypt](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/subtlecrypto/decrypt) operation when using the AES-CTR algorithm.
1012

1113
For more details, head to the MDN Web Crypto API documentation on [AES-CTR](https://developer.mozilla.org/en-US/docs/Web/API/AesCtrParams).

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/aesgcmparams.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ weight: 06
66

77
# AesGcmParams
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
The `AesGcmParams` object represents the object that should be passed as the algorithm parameter into the [encrypt](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/subtlecrypto/encrypt) and [decrypt](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/subtlecrypto/decrypt) operation when using the AES-GCM algorithm.
1012

1113
For more details, head to the [MDN Web Crypto API documentation on AES-GCM](https://developer.mozilla.org/en-US/docs/Web/API/AesGcmParams).

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/aeskeygenparams.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ weight: 07
66

77
# AesKeyGenParams
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
The `AesKeyGenParams` object represents the object that should be passed as the algorithm parameter into the [generateKey](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/subtlecrypto/generatekey) operation when generating an AES key.
1012

1113
## Properties

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/crypto/_index.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ weight: 01
66

77
# Crypto
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
`Crypto` allows access to a cryptographically strong random number generator and to cryptographic primitives.
1012

1113
## Properties

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/crypto/getrandomvalues.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ weight: 01
66

77
# getRandomValues
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
The `getRandomValues()` method fills the passed `TypedArray` with cryptographically sound random values.
1012

1113
## Usage

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/crypto/randomuuid.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ weight: 02
66

77
# randomUUID
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
The `randomUUID` method produces a 36-characters long string that contains a cryptographically random UUID v4.
1012

1113
## Usage

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/cryptokey.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ weight: 02
66

77
# CryptoKey
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
The `CryptoKey` object represents a cryptographic key used for [encryption](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/subtlecrypto/encrypt),[decryption](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/subtlecrypto/decrypt),[signing](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/subtlecrypto/sign), or [verification](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/subtlecrypto/verify) within the webcrypto module. The `CryptoKey` object is created using the SubtleCrypto.generateKey() or SubtleCrypto.importKey() methods.
1012

1113
## Properties

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/cryptokeypair.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ weight: 08
66

77
# CryptoKeyPair
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
The `CryptoKeyPair` object represents an asymmetric key pair with public and private keys.
1012

1113
The [`generateKey`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/subtlecrypto/generatekey/) method can be used to create `CryptoKeyPair` object for asymmetric algorithms such as `ECDH` or `ECDSA`.

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/ecdhkeyderiveparams.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ weight: 10
66

77
# EcdhKeyDeriveParams
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
The `EcdhKeyDeriveParams` represents the object that should be passed as the algorithm parameter into [`deriveBits`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/subtlecrypto/derivebits/), when using the ECDH algorithm.
1012

1113
ECDH is a secure communication method. Parties exchange public keys and use them with their private keys to generate a unique shared secret key.

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/ecdsaparams.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ weight: 11
66

77
# EcdsaParams
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
The `EcdsaParams` represents the object that should be passed as the algorithm parameter into [`sign`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/subtlecrypto/sign/) or [`verify`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/subtlecrypto/verify/) when using the ECDSA algorithm.
1012

1113
## Properties

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/eckeygenparams.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ weight: 09
66

77
# EcKeyGenParams
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
The `EcKeyGenParams` object represents the object that should be passed as the algorithm parameter into the [generateKey](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/subtlecrypto/generatekey) operation when generating key pairs for ECDH or ECDSA algorithms.
1012

1113
## Properties

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/hmackeygenparams.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ weight: 12
66

77
# HmacKeyGenParams
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
The `HmacKeyGenParams` object represents the object that should be passed as the algorithm parameter into the [generateKey](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/subtlecrypto/generatekey) operation when generating an HMAC key.
1012

1113
## Properties
1214

1315
| Property | Type | Description |
1416
| :---------------- | :------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
15-
| name | `string` | This should be set to `HMAC`. |
17+
| name | `string` | This should be set to `HMAC`. |
1618
| hash | `string` | The name of the digest function to use. Possible values are `SHA-1`, `SHA-256`, `SHA-384` and `SHA-512`. |
1719
| length (optional) | `number` | The length of the key in bits. If this is omitted, the length of the key is equal to the block size of the hash function you have chosen. We recommend to leave this parameter empty, unless you have a good reason to use something different. |
1820

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/jsonwebkey.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ weight: 13
66

77
# JsonWebKey
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
The `JsonWebKey` object represents object/dictionary generated by exporting a [`CryptoKey`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/cryptokey) or used as an input parameter for key import.
1012

1113
The properties of the `JsonWebKey` could vary depending on the algorithm and key type. See specification [JsonWebKey](https://www.w3.org/TR/WebCryptoAPI/#JsonWebKey-dictionary) for details.

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/rsahashedimportparams.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ weight: 12
66

77
# RsaHashedImportParams
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
The `RsaHashedImportParams` represents the object that should be passed as the algorithm parameter into [`importKey`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/subtlecrypto/importkey/) when using the RSA algorithm.
1012

1113
## Properties

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/rsahashedkeygenparams.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ weight: 12
66

77
# RSAHashedKeyGenParams
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
The `RSAHashedKeyGenParams` object represents the object that should be passed as the algorithm parameter into the [generateKey](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/subtlecrypto/generatekey) operation when generating an RSA key pair.
1012

1113
## Properties

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/rsaoaepparams.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ weight: 06
66

77
# RsaOaepParams
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
The `RsaOaepParams` object represents the object that should be passed as the algorithm parameter into the [encrypt](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/subtlecrypto/encrypt) and [decrypt](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/subtlecrypto/decrypt) operation when using the RSA-OAEP algorithm.
1012

1113
For more details, head to the [MDN Web Crypto API documentation on RSA-OAEP](https://developer.mozilla.org/en-US/docs/Web/API/RsaOaepParams).
@@ -16,4 +18,4 @@ For more details, head to the [MDN Web Crypto API documentation on RSA-OAEP](htt
1618
| :--------------- | :----------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1719
| name | `string` | Should be set to `RSA-OAEP`. |
1820
| label (optional) | `ArrayBuffer`, `TypedArray`, or `DataView` | It's an array of bytes that does not itself need to be encrypted but which should be bound to the ciphertext. A digest of the label is part of the input to the encryption operation. Unless your application calls for a label, you can just omit this argument, and it will not affect the security of the encryption operation. |
19-
| |
21+
| |

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/rsapssparams.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ weight: 11
66

77
# RsaPssParams
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
The `RsaPssParams` represents the object that should be passed as the algorithm parameter into [`sign`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/subtlecrypto/sign/) or [`verify`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/subtlecrypto/verify/) when using the RSA-PSS algorithm.
1012

1113
## Properties

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/subtlecrypto/_index.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ weight: 03
66

77
# SubtleCrypto
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
The `SubtleCrypto` interface provides a set of low-level cryptographic primitives such as encryption, decryption, digital signature generation and verification, and key generation and management. It is useful for using secure and efficient cryptographic operations within k6 scripts.
1012

1113
## Methods

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/subtlecrypto/decrypt.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ weight: 01
66

77
# decrypt
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
The `decrypt()` method decrypts some encrypted data.
1012

1113
## Usage

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/subtlecrypto/derivebits.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ weight: 02
66

77
# deriveBits
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
It takes as its arguments the base key, the derivation algorithm to use, and the length of the bits to derive. It returns a Promise which will be fulfilled with an `ArrayBuffer` containing the derived bits. This array of bits can be used as a key for encryption or decryption as a shared secret.
1012

1113
## Usage

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/subtlecrypto/digest.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ weight: 02
66

77
# digest
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
The `digest()` method generates a cryptographically secure [digest](https://developer.mozilla.org/en-US/docs/Glossary/Digest) of the given data. A digest is a short fixed-length value derived from some input data. The `digest()` method is commonly used to compute a checksum of data or to verify the integrity of data.
1012

1113
## Usage

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/subtlecrypto/encrypt.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ weight: 03
66

77
# encrypt
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
The `encrypt()` method encrypts some data.
1012

1113
## Usage

docs/sources/k6/next/javascript-api/k6-experimental/webcrypto/subtlecrypto/exportkey.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ weight: 04
66

77
# exportKey
88

9+
{{< docs/shared source="k6" lookup="webcrypto/deprecated.md" version="<K6_VERSION>" >}}
10+
911
The `exportKey()` method takes a [CryptoKey](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/webcrypto/cryptokey) object as input and exports it in an external, portable format.
1012

1113
Note that for a key to be exportable, it must have been created with the `extractable` flag set to `true`.

0 commit comments

Comments
 (0)