Skip to content

Commit

Permalink
refactor: add explicit return types everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Jun 3, 2024
1 parent 89a2604 commit cc2b2d7
Show file tree
Hide file tree
Showing 19 changed files with 136 additions and 134 deletions.
16 changes: 8 additions & 8 deletions docs/classes/jwe_compact_encrypt.CompactEncrypt.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ ___

### setContentEncryptionKey

**setContentEncryptionKey**(`cek`): [`CompactEncrypt`](jwe_compact_encrypt.CompactEncrypt.md)
**setContentEncryptionKey**(`cek`): `this`

Sets a content encryption key to use, by default a random suitable one is generated for the JWE
enc" (Encryption Algorithm) Header Parameter.
Expand All @@ -86,7 +86,7 @@ enc" (Encryption Algorithm) Header Parameter.

#### Returns

[`CompactEncrypt`](jwe_compact_encrypt.CompactEncrypt.md)
`this`

**`Deprecated`**

Expand All @@ -97,7 +97,7 @@ ___

### setInitializationVector

**setInitializationVector**(`iv`): [`CompactEncrypt`](jwe_compact_encrypt.CompactEncrypt.md)
**setInitializationVector**(`iv`): `this`

Sets the JWE Initialization Vector to use for content encryption, by default a random suitable
one is generated for the JWE enc" (Encryption Algorithm) Header Parameter.
Expand All @@ -110,7 +110,7 @@ one is generated for the JWE enc" (Encryption Algorithm) Header Parameter.

#### Returns

[`CompactEncrypt`](jwe_compact_encrypt.CompactEncrypt.md)
`this`

**`Deprecated`**

Expand All @@ -121,7 +121,7 @@ ___

### setKeyManagementParameters

**setKeyManagementParameters**(`parameters`): [`CompactEncrypt`](jwe_compact_encrypt.CompactEncrypt.md)
**setKeyManagementParameters**(`parameters`): `this`

Sets the JWE Key Management parameters to be used when encrypting the Content Encryption Key.
You do not need to invoke this method, it is only really intended for test and vector
Expand All @@ -135,13 +135,13 @@ validation purposes.

#### Returns

[`CompactEncrypt`](jwe_compact_encrypt.CompactEncrypt.md)
`this`

___

### setProtectedHeader

**setProtectedHeader**(`protectedHeader`): [`CompactEncrypt`](jwe_compact_encrypt.CompactEncrypt.md)
**setProtectedHeader**(`protectedHeader`): `this`

Sets the JWE Protected Header on the CompactEncrypt object.

Expand All @@ -153,4 +153,4 @@ Sets the JWE Protected Header on the CompactEncrypt object.

#### Returns

[`CompactEncrypt`](jwe_compact_encrypt.CompactEncrypt.md)
`this`
28 changes: 14 additions & 14 deletions docs/classes/jwe_flattened_encrypt.FlattenedEncrypt.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ ___

### setAdditionalAuthenticatedData

**setAdditionalAuthenticatedData**(`aad`): [`FlattenedEncrypt`](jwe_flattened_encrypt.FlattenedEncrypt.md)
**setAdditionalAuthenticatedData**(`aad`): `this`

Sets the Additional Authenticated Data on the FlattenedEncrypt object.

Expand All @@ -89,13 +89,13 @@ Sets the Additional Authenticated Data on the FlattenedEncrypt object.

#### Returns

[`FlattenedEncrypt`](jwe_flattened_encrypt.FlattenedEncrypt.md)
`this`

___

### setContentEncryptionKey

**setContentEncryptionKey**(`cek`): [`FlattenedEncrypt`](jwe_flattened_encrypt.FlattenedEncrypt.md)
**setContentEncryptionKey**(`cek`): `this`

Sets a content encryption key to use, by default a random suitable one is generated for the JWE
enc" (Encryption Algorithm) Header Parameter.
Expand All @@ -108,7 +108,7 @@ enc" (Encryption Algorithm) Header Parameter.

#### Returns

[`FlattenedEncrypt`](jwe_flattened_encrypt.FlattenedEncrypt.md)
`this`

**`Deprecated`**

Expand All @@ -119,7 +119,7 @@ ___

### setInitializationVector

**setInitializationVector**(`iv`): [`FlattenedEncrypt`](jwe_flattened_encrypt.FlattenedEncrypt.md)
**setInitializationVector**(`iv`): `this`

Sets the JWE Initialization Vector to use for content encryption, by default a random suitable
one is generated for the JWE enc" (Encryption Algorithm) Header Parameter.
Expand All @@ -132,7 +132,7 @@ one is generated for the JWE enc" (Encryption Algorithm) Header Parameter.

#### Returns

[`FlattenedEncrypt`](jwe_flattened_encrypt.FlattenedEncrypt.md)
`this`

**`Deprecated`**

Expand All @@ -143,7 +143,7 @@ ___

### setKeyManagementParameters

**setKeyManagementParameters**(`parameters`): [`FlattenedEncrypt`](jwe_flattened_encrypt.FlattenedEncrypt.md)
**setKeyManagementParameters**(`parameters`): `this`

Sets the JWE Key Management parameters to be used when encrypting. Use of this is method is
really only needed for ECDH based algorithms when utilizing the Agreement PartyUInfo or
Expand All @@ -158,13 +158,13 @@ and missing.

#### Returns

[`FlattenedEncrypt`](jwe_flattened_encrypt.FlattenedEncrypt.md)
`this`

___

### setProtectedHeader

**setProtectedHeader**(`protectedHeader`): [`FlattenedEncrypt`](jwe_flattened_encrypt.FlattenedEncrypt.md)
**setProtectedHeader**(`protectedHeader`): `this`

Sets the JWE Protected Header on the FlattenedEncrypt object.

Expand All @@ -176,13 +176,13 @@ Sets the JWE Protected Header on the FlattenedEncrypt object.

#### Returns

[`FlattenedEncrypt`](jwe_flattened_encrypt.FlattenedEncrypt.md)
`this`

___

### setSharedUnprotectedHeader

**setSharedUnprotectedHeader**(`sharedUnprotectedHeader`): [`FlattenedEncrypt`](jwe_flattened_encrypt.FlattenedEncrypt.md)
**setSharedUnprotectedHeader**(`sharedUnprotectedHeader`): `this`

Sets the JWE Shared Unprotected Header on the FlattenedEncrypt object.

Expand All @@ -194,13 +194,13 @@ Sets the JWE Shared Unprotected Header on the FlattenedEncrypt object.

#### Returns

[`FlattenedEncrypt`](jwe_flattened_encrypt.FlattenedEncrypt.md)
`this`

___

### setUnprotectedHeader

**setUnprotectedHeader**(`unprotectedHeader`): [`FlattenedEncrypt`](jwe_flattened_encrypt.FlattenedEncrypt.md)
**setUnprotectedHeader**(`unprotectedHeader`): `this`

Sets the JWE Per-Recipient Unprotected Header on the FlattenedEncrypt object.

Expand All @@ -212,4 +212,4 @@ Sets the JWE Per-Recipient Unprotected Header on the FlattenedEncrypt object.

#### Returns

[`FlattenedEncrypt`](jwe_flattened_encrypt.FlattenedEncrypt.md)
`this`
4 changes: 2 additions & 2 deletions docs/classes/jwe_general_encrypt.GeneralEncrypt.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ ___

### setAdditionalAuthenticatedData

**setAdditionalAuthenticatedData**(`aad`): [`GeneralEncrypt`](jwe_general_encrypt.GeneralEncrypt.md)
**setAdditionalAuthenticatedData**(`aad`): `this`

Sets the Additional Authenticated Data on the GeneralEncrypt object.

Expand All @@ -101,7 +101,7 @@ Sets the Additional Authenticated Data on the GeneralEncrypt object.

#### Returns

[`GeneralEncrypt`](jwe_general_encrypt.GeneralEncrypt.md)
`this`

___

Expand Down
4 changes: 2 additions & 2 deletions docs/classes/jws_compact_sign.CompactSign.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ console.log(jws)

### setProtectedHeader

**setProtectedHeader**(`protectedHeader`): [`CompactSign`](jws_compact_sign.CompactSign.md)
**setProtectedHeader**(`protectedHeader`): `this`

Sets the JWS Protected Header on the Sign object.

Expand All @@ -63,7 +63,7 @@ Sets the JWS Protected Header on the Sign object.

#### Returns

[`CompactSign`](jws_compact_sign.CompactSign.md)
`this`

___

Expand Down
8 changes: 4 additions & 4 deletions docs/classes/jws_flattened_sign.FlattenedSign.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ console.log(jws)

### setProtectedHeader

**setProtectedHeader**(`protectedHeader`): [`FlattenedSign`](jws_flattened_sign.FlattenedSign.md)
**setProtectedHeader**(`protectedHeader`): `this`

Sets the JWS Protected Header on the FlattenedSign object.

Expand All @@ -64,13 +64,13 @@ Sets the JWS Protected Header on the FlattenedSign object.

#### Returns

[`FlattenedSign`](jws_flattened_sign.FlattenedSign.md)
`this`

___

### setUnprotectedHeader

**setUnprotectedHeader**(`unprotectedHeader`): [`FlattenedSign`](jws_flattened_sign.FlattenedSign.md)
**setUnprotectedHeader**(`unprotectedHeader`): `this`

Sets the JWS Unprotected Header on the FlattenedSign object.

Expand All @@ -82,7 +82,7 @@ Sets the JWS Unprotected Header on the FlattenedSign object.

#### Returns

[`FlattenedSign`](jws_flattened_sign.FlattenedSign.md)
`this`

___

Expand Down
Loading

0 comments on commit cc2b2d7

Please sign in to comment.