# Method Web.encode_jwk()

Method encode_jwk

  ``string(7bit)` encode_jwk(`mapping`(`string(7bit)`:`string(7bit)`) `jwk`)`

Description

  Encode a JSON Web Key (JWK).

Method encode_jwk

  ``variant` `string(7bit)` encode_jwk(``Crypto.Sign.State``|`Crypto.MAC.State` `sign`, `bool`|`void` `private_key`)`

Description

  Encode a JSON Web Key (JWK).

Parameter `sign`

  The initialized `Crypto.Sign.State` or Crypto.MAC.State for which a JWK is to be generated.

Parameter `private_key`

  If true the private fields of sign will also be encoded into the result.

Returns

  Returns the corresponding JWK.