SigningKey
Represents a cryptographic key (or key pair) used for JWS signing and/or verification.
Instances are identified by a (SigningAlgorithm, optional key ID) pair captured in identifier. Depending on which key material is available, a SigningKey may be:
SigningOnlyKey — holds only a private key; used by co.touchlab.kjwt.builder.JwtBuilder to produce signatures.
VerifyOnlyKey — holds only a public key; used by co.touchlab.kjwt.parser.JwtParser to verify signatures.
SigningKeyPair — holds both keys; supports both signing and verification.
Complementary keys that share the same Identifier can be merged into a SigningKeyPair via mergeWith. This happens automatically when both are registered with the same co.touchlab.kjwt.model.registry.DefaultJwtProcessorRegistry.
Each subtype directly implements the appropriate processor interface (JwsSigner, JwsVerifier, or JwsProcessor) and carries the cryptographic logic for its role.
See also
Inheritors
Types
Identifies a SigningKey within a co.touchlab.kjwt.model.registry.DefaultJwtProcessorRegistry by algorithm and optional key ID.
A complete key pair that holds both private and public key material, implementing JwsProcessor.
A signing-only key that holds only the private key material, implementing JwsSigner.
A verify-only key that holds only the public key material, implementing JwsVerifier.