IDataSigner<TJsonWebKey> Interface
Abblix.Jwt
Abblix.Jwt.Signing
IDataSigner<TJsonWebKey> Interface
Defines the contract for signing and verifying JWT tokens using a specific cryptographic algorithm.
public interface IDataSigner<in TJsonWebKey>
where TJsonWebKey : Abblix.Jwt.JsonWebKey
Type parameters
TJsonWebKey
Methods
IDataSigner<TJsonWebKey>.Sign(TJsonWebKey, byte[]) Method
Signs the provided data using the configured algorithm and specified key.
byte[] Sign(TJsonWebKey key, byte[] data);
Parameters
key TJsonWebKey
The key to use for signing.
data System.Byte[]
The data to sign (typically the JWT header.payload part).
Returns
System.Byte[]
The signature bytes.
IDataSigner<TJsonWebKey>.Verify(TJsonWebKey, byte[], byte[]) Method
Verifies the signature of the provided data using the configured algorithm and specified key.
bool Verify(TJsonWebKey key, byte[] data, byte[] signature);
Parameters
key TJsonWebKey
The key to use for verification.
data System.Byte[]
The data that was signed (typically the JWT header.payload part).
signature System.Byte[]
The signature to verify.
Returns
System.Boolean
True if the signature is valid; otherwise, false.