Skip to content

Commit b8bca07

Browse files
author
Ivan Mirić
committed
Mention version support for ArrayBuffer as input
Resolves #235 (review)
1 parent e8d9ae0 commit b8bca07

14 files changed

+35
-35
lines changed

src/data/markdown/docs/02 javascript api/03 k6-crypto/02-createHMAC- algorithm- secret -.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Creates a HMAC hashing object that can then be fed with data repeatedly, and fro
88
| Parameter | Type | Description |
99
| --------- | :----: | :---------------------------------------------------------------------------------------------------------------------------------- |
1010
| algorithm | string | The hashing algorithm to use. One of `md4`, `md5`, `sha1`, `sha256`, `sha384`, `sha512`, `sha512_224`, `sha512_256` or `ripemd160`. |
11-
| secret | string / ArrayBuffer | A shared secret used to sign the data. |
11+
| secret | string / ArrayBuffer <sup>(≥ v0.31.0)</sup> | A shared secret used to sign the data. |
1212

1313
### Returns
1414

src/data/markdown/docs/02 javascript api/03 k6-crypto/03-hmac- algorithm- secret- data- outputEncoding -.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ Use [HMAC](https://en.wikipedia.org/wiki/Hash-based_message_authentication_code)
88
| Parameter | Type | Description |
99
| -------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------- |
1010
| algorithm | string | The hashing algorithm to use. One of `md4`, `md5`, `sha1`, `sha256`, `sha384`, `sha512`, `sha512_224`, `sha512_256` or `ripemd160`. |
11-
| secret | string / ArrayBuffer | A shared secret used to sign the data. |
12-
| data | string / ArrayBuffer | The data to sign. |
11+
| secret | string / ArrayBuffer <sup>(≥ v0.31.0)</sup> | A shared secret used to sign the data. |
12+
| data | string / ArrayBuffer <sup>(≥ v0.31.0)</sup> | The data to sign. |
1313
| outputEncoding | string | Describes the type of encoding to use for the hash value. Can be "base64", "base64url", "base64rawurl", "hex" or "binary". |
1414

1515
### Returns
1616

17-
| Type | Description |
18-
| -------------- | ------------------------------ |
17+
| Type | Description |
18+
| -------------- | ----------- |
1919
| string / Array | The hash digest as string (for "base64", "base64url", "base64rawurl", "hex" `outputEncoding`) or raw array of integers (for "binary" `outputEncoding`). |
2020

2121

src/data/markdown/docs/02 javascript api/03 k6-crypto/04-md4- input- outputEncoding -.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ Use [md4](https://pkg.go.dev/golang.org/x/crypto/md4) to hash input data.
77

88
| Parameter | Type | Description |
99
| -------------- | -------------------- | --------------------------------------------------|
10-
| input | string / ArrayBuffer | The input string or `ArrayBuffer` object to hash. |
10+
| input | string / ArrayBuffer <sup>(≥ v0.31.0)</sup> | The input string or `ArrayBuffer` object to hash. |
1111
| outputEncoding | string | Describes the type of encoding to use for the hash value. Can be "base64", "base64url", "base64rawurl", "hex" or "binary". |
1212

1313
### Returns
1414

15-
| Type | Description |
16-
| -------------- | ------------------------------ |
15+
| Type | Description |
16+
| -------------- | ----------- |
1717
| string / Array | The hash digest as string (for "base64", "base64url", "base64rawurl", "hex" `outputEncoding`) or raw array of integers (for "binary" `outputEncoding`). |
1818

1919
### Example

src/data/markdown/docs/02 javascript api/03 k6-crypto/05-md5- input- outputEncoding -.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ Use [md5](https://golang.org/pkg/crypto/md5/) to hash input data.
77

88
| Parameter | Type | Description |
99
| -------------- | -------------------- | --------------------------------------------------|
10-
| input | string / ArrayBuffer | The input string or `ArrayBuffer` object to hash. |
10+
| input | string / ArrayBuffer <sup>(≥ v0.31.0)</sup> | The input string or `ArrayBuffer` object to hash. |
1111
| outputEncoding | string | Describes the type of encoding to use for the hash value. Can be "base64", "base64url", "base64rawurl", "hex" or "binary". |
1212

1313
### Returns
1414

15-
| Type | Description |
16-
| -------------- | ------------------------------ |
15+
| Type | Description |
16+
| -------------- | ----------- |
1717
| string / Array | The hash digest as string (for "base64", "base64url", "base64rawurl", "hex" `outputEncoding`) or raw array of integers (for "binary" `outputEncoding`). |
1818

1919
### Example

src/data/markdown/docs/02 javascript api/03 k6-crypto/07-ripemd160- input- outputEncoding -.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ Use [ripemd160](https://pkg.go.dev/golang.org/x/crypto/ripemd160) to hash input
77

88
| Parameter | Type | Description |
99
| -------------- | -------------------- | --------------------------------------------------|
10-
| input | string / ArrayBuffer | The input string or `ArrayBuffer` object to hash. |
10+
| input | string / ArrayBuffer <sup>(≥ v0.31.0)</sup> | The input string or `ArrayBuffer` object to hash. |
1111
| outputEncoding | string | Describes the type of encoding to use for the hash value. Can be "base64", "base64url", "base64rawurl", "hex" or "binary". |
1212

1313
### Returns
1414

15-
| Type | Description |
16-
| -------------- | ------------------------------ |
15+
| Type | Description |
16+
| -------------- | ----------- |
1717
| string / Array | The hash digest as string (for "base64", "base64url", "base64rawurl", "hex" `outputEncoding`) or raw array of integers (for "binary" `outputEncoding`). |
1818

1919

src/data/markdown/docs/02 javascript api/03 k6-crypto/08-sha1- input- outputEncoding -.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ Use [sha1](https://golang.org/pkg/crypto/sha1/) to hash input data.
77

88
| Parameter | Type | Description |
99
| -------------- | -------------------- | --------------------------------------------------|
10-
| input | string / ArrayBuffer | The input string or `ArrayBuffer` object to hash. |
10+
| input | string / ArrayBuffer <sup>(≥ v0.31.0)</sup> | The input string or `ArrayBuffer` object to hash. |
1111
| outputEncoding | string | Describes the type of encoding to use for the hash value. Can be "base64", "base64url", "base64rawurl", "hex" or "binary". |
1212

1313
### Returns
1414

15-
| Type | Description |
16-
| -------------- | ------------------------------ |
15+
| Type | Description |
16+
| -------------- | ----------- |
1717
| string / Array | The hash digest as string (for "base64", "base64url", "base64rawurl", "hex" `outputEncoding`) or raw array of integers (for "binary" `outputEncoding`). |
1818

1919

src/data/markdown/docs/02 javascript api/03 k6-crypto/09-sha256- input- outputEncoding -.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ Use [sha256](https://golang.org/pkg/crypto/sha256/) to hash input data.
77

88
| Parameter | Type | Description |
99
| -------------- | -------------------- | --------------------------------------------------|
10-
| input | string / ArrayBuffer | The input string or `ArrayBuffer` object to hash. |
10+
| input | string / ArrayBuffer <sup>(≥ v0.31.0)</sup> | The input string or `ArrayBuffer` object to hash. |
1111
| outputEncoding | string | Describes the type of encoding to use for the hash value. Can be "base64", "base64url", "base64rawurl", "hex" or "binary". |
1212

1313
### Returns
1414

15-
| Type | Description |
16-
| -------------- | ------------------------------ |
15+
| Type | Description |
16+
| -------------- | ----------- |
1717
| string / Array | The hash digest as string (for "base64", "base64url", "base64rawurl", "hex" `outputEncoding`) or raw array of integers (for "binary" `outputEncoding`). |
1818

1919

src/data/markdown/docs/02 javascript api/03 k6-crypto/10-sha384- input- outputEncoding -.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ Use [sha384](https://golang.org/pkg/crypto/sha512/) to hash input data.
77

88
| Parameter | Type | Description |
99
| -------------- | -------------------- | --------------------------------------------------|
10-
| input | string / ArrayBuffer | The input string or `ArrayBuffer` object to hash. |
10+
| input | string / ArrayBuffer <sup>(≥ v0.31.0)</sup> | The input string or `ArrayBuffer` object to hash. |
1111
| outputEncoding | string | Describes the type of encoding to use for the hash value. Can be "base64", "base64url", "base64rawurl", "hex" or "binary". |
1212

1313
### Returns
1414

15-
| Type | Description |
16-
| -------------- | ------------------------------ |
15+
| Type | Description |
16+
| -------------- | ----------- |
1717
| string / Array | The hash digest as string (for "base64", "base64url", "base64rawurl", "hex" `outputEncoding`) or raw array of integers (for "binary" `outputEncoding`). |
1818

1919

src/data/markdown/docs/02 javascript api/03 k6-crypto/11-sha512- input- outputEncoding -.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ Use [sha512](https://golang.org/pkg/crypto/sha512/) to hash input data.
77

88
| Parameter | Type | Description |
99
| -------------- | -------------------- | --------------------------------------------------|
10-
| input | string / ArrayBuffer | The input string or `ArrayBuffer` object to hash. |
10+
| input | string / ArrayBuffer <sup>(≥ v0.31.0)</sup> | The input string or `ArrayBuffer` object to hash. |
1111
| outputEncoding | string | Describes the type of encoding to use for the hash value. Can be "base64", "base64url", "base64rawurl", "hex" or "binary". |
1212

1313
### Returns
1414

15-
| Type | Description |
16-
| -------------- | ------------------------------ |
15+
| Type | Description |
16+
| -------------- | ----------- |
1717
| string / Array | The hash digest as string (for "base64", "base64url", "base64rawurl", "hex" `outputEncoding`) or raw array of integers (for "binary" `outputEncoding`). |
1818

1919

src/data/markdown/docs/02 javascript api/03 k6-crypto/12-sha512_256- input- outputEncoding -.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ Use [sha512_256](https://golang.org/pkg/crypto/sha512/) to hash input data.
77

88
| Parameter | Type | Description |
99
| -------------- | -------------------- | --------------------------------------------------|
10-
| input | string / ArrayBuffer | The input string or `ArrayBuffer` object to hash. |
10+
| input | string / ArrayBuffer <sup>(≥ v0.31.0)</sup> | The input string or `ArrayBuffer` object to hash. |
1111
| outputEncoding | string | Describes the type of encoding to use for the hash value. Can be "base64", "base64url", "base64rawurl", "hex" or "binary". |
1212

1313
### Returns
1414

15-
| Type | Description |
16-
| -------------- | ------------------------------ |
15+
| Type | Description |
16+
| -------------- | ----------- |
1717
| string / Array | The hash digest as string (for "base64", "base64url", "base64rawurl", "hex" `outputEncoding`) or raw array of integers (for "binary" `outputEncoding`). |
1818

1919

0 commit comments

Comments
 (0)