Jwk

class Jwk(val kty: String, val crv: String, val use: String?, val alg: String?, var kid: String?, val d: String?, val x: String?, val y: String?)

Represents a JSON Web Key (Jwk ). A Jwk is a JSON object that represents a cryptographic key. This class provides functionalities to manage a Jwk including its creation, conversion to and from JSON, and computing a thumbprint.

Example:

var jwk = Jwk(
kty: 'RSA',
alg: 'RS256',
use: 'sig',
... // other parameters
);

Constructors

Link copied to clipboard
constructor(kty: String, crv: String, use: String?, alg: String?, kid: String?, d: String?, x: String?, y: String?)

Types

Link copied to clipboard
class Builder(keyType: String, curve: String)

Builder for Jwk type.

Properties

Link copied to clipboard
val alg: String?

Identifies the algorithm intended for use with the key.

Link copied to clipboard
val crv: String

Elliptic curve name for EC keys.

Link copied to clipboard
val d: String?

Private key component for EC or OKP keys.

Link copied to clipboard
var kid: String?

Key ID, unique identifier for the key.

Link copied to clipboard
val kty: String

Represents the key type.

Link copied to clipboard
val use: String?

Represents the intended use of the public key.

Link copied to clipboard
val x: String?

X coordinate for EC keys, or the public key for OKP.

Link copied to clipboard
val y: String?

Y coordinate for EC keys.

Functions

Link copied to clipboard

Computes the thumbprint of the Jwk. Specification.

Link copied to clipboard
open override fun toString(): String