#### [Abblix\.Jwt](https://www.abblix.com/en/docs/api/abblix-jwt 'index')
### [Abblix\.Jwt\.Signing](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.Signing 'Abblix\.Jwt\.Signing')

## IDataSigner\<TJsonWebKey\> Interface

Defines the contract for signing and verifying JWT tokens using a specific cryptographic algorithm\.

```csharp
public interface IDataSigner<in TJsonWebKey>
    where TJsonWebKey : Abblix.Jwt.JsonWebKey
```
#### Type parameters

###### `TJsonWebKey` {#Abblix.Jwt.Signing.IDataSigner_TJsonWebKey_.TJsonWebKey}
### Methods

## IDataSigner\<TJsonWebKey\>\.Sign\(TJsonWebKey, byte\[\]\) Method {#Abblix.Jwt.Signing.IDataSigner_TJsonWebKey_.Sign(TJsonWebKey,byte[])}

Signs the provided data using the configured algorithm and specified key\.

```csharp
byte[] Sign(TJsonWebKey key, byte[] data);
```
#### Parameters

###### `key` [TJsonWebKey](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.Signing.IDataSigner_TJsonWebKey_#Abblix.Jwt.Signing.IDataSigner_TJsonWebKey_.TJsonWebKey 'Abblix\.Jwt\.Signing\.IDataSigner\<TJsonWebKey\>\.TJsonWebKey') {#Abblix.Jwt.Signing.IDataSigner_TJsonWebKey_.Sign(TJsonWebKey,byte[]).key}

The key to use for signing\.

###### `data` [System\.Byte](https://learn.microsoft.com/en-us/dotnet/api/system.byte 'System\.Byte')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array') {#Abblix.Jwt.Signing.IDataSigner_TJsonWebKey_.Sign(TJsonWebKey,byte[]).data}

The data to sign \(typically the JWT header\.payload part\)\.

#### Returns
[System\.Byte](https://learn.microsoft.com/en-us/dotnet/api/system.byte 'System\.Byte')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array')  
The signature bytes\.

## IDataSigner\<TJsonWebKey\>\.Verify\(TJsonWebKey, byte\[\], byte\[\]\) Method {#Abblix.Jwt.Signing.IDataSigner_TJsonWebKey_.Verify(TJsonWebKey,byte[],byte[])}

Verifies the signature of the provided data using the configured algorithm and specified key\.

```csharp
bool Verify(TJsonWebKey key, byte[] data, byte[] signature);
```
#### Parameters

###### `key` [TJsonWebKey](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.Signing.IDataSigner_TJsonWebKey_#Abblix.Jwt.Signing.IDataSigner_TJsonWebKey_.TJsonWebKey 'Abblix\.Jwt\.Signing\.IDataSigner\<TJsonWebKey\>\.TJsonWebKey') {#Abblix.Jwt.Signing.IDataSigner_TJsonWebKey_.Verify(TJsonWebKey,byte[],byte[]).key}

The key to use for verification\.

###### `data` [System\.Byte](https://learn.microsoft.com/en-us/dotnet/api/system.byte 'System\.Byte')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array') {#Abblix.Jwt.Signing.IDataSigner_TJsonWebKey_.Verify(TJsonWebKey,byte[],byte[]).data}

The data that was signed \(typically the JWT header\.payload part\)\.

###### `signature` [System\.Byte](https://learn.microsoft.com/en-us/dotnet/api/system.byte 'System\.Byte')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array') {#Abblix.Jwt.Signing.IDataSigner_TJsonWebKey_.Verify(TJsonWebKey,byte[],byte[]).signature}

The signature to verify\.

#### Returns
[System\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean')  
True if the signature is valid; otherwise, false\.
