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

## EllipticCurveJsonWebKey Class

Represents an Elliptic Curve JSON Web Key \(JWK\) containing EC\-specific cryptographic parameters\.
Supports both public and private EC keys per RFC 7518 Section 6\.2\.

```csharp
public sealed record EllipticCurveJsonWebKey : Abblix.Jwt.JsonWebKey, System.IEquatable<Abblix.Jwt.EllipticCurveJsonWebKey>
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → [JsonWebKey](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.JsonWebKey 'Abblix\.Jwt\.JsonWebKey') → EllipticCurveJsonWebKey

Implements [System\.IEquatable&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.iequatable-1 'System\.IEquatable\`1')[EllipticCurveJsonWebKey](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.EllipticCurveJsonWebKey 'Abblix\.Jwt\.EllipticCurveJsonWebKey')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.iequatable-1 'System\.IEquatable\`1')
### Properties

## EllipticCurveJsonWebKey\.Curve Property {#Abblix.Jwt.EllipticCurveJsonWebKey.Curve}

Elliptic Curve Type \(crv\)\. Identifies the curve type for an Elliptic Curve key\.
Common values include "P\-256", "P\-384", "P\-521" for NIST curves\.
This is a required parameter for EC keys\.

```csharp
public string? Curve { get; set; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')

## EllipticCurveJsonWebKey\.HasPrivateKey Property {#Abblix.Jwt.EllipticCurveJsonWebKey.HasPrivateKey}

Checks if the key contains private key material\.

```csharp
public override bool HasPrivateKey { get; }
```

#### Property Value
[System\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean')

## EllipticCurveJsonWebKey\.HasPublicKey Property {#Abblix.Jwt.EllipticCurveJsonWebKey.HasPublicKey}

Checks if the key contains public key material\.

```csharp
public override bool HasPublicKey { get; }
```

#### Property Value
[System\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean')

## EllipticCurveJsonWebKey\.KeyType Property {#Abblix.Jwt.EllipticCurveJsonWebKey.KeyType}

The key type identifier for Elliptic Curve keys\. Always returns "EC"\.

```csharp
public override string KeyType { get; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')

## EllipticCurveJsonWebKey\.PrivateKey Property {#Abblix.Jwt.EllipticCurveJsonWebKey.PrivateKey}

ECC Private Key \(d\)\. Represents the private part of an Elliptic Curve key\.
This parameter must be kept confidential and should only be present in private keys\.

```csharp
public byte[]? PrivateKey { get; set; }
```

#### Property Value
[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')

## EllipticCurveJsonWebKey\.X Property {#Abblix.Jwt.EllipticCurveJsonWebKey.X}

X\-coordinate for Elliptic Curve \(x\)\. Part of the Elliptic Curve public key\.
This is a required parameter for EC public keys\.

```csharp
public byte[]? X { get; set; }
```

#### Property Value
[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')

## EllipticCurveJsonWebKey\.Y Property {#Abblix.Jwt.EllipticCurveJsonWebKey.Y}

Y\-coordinate for Elliptic Curve \(y\)\. Part of the Elliptic Curve public key\.
This is a required parameter for EC public keys\.

```csharp
public byte[]? Y { get; set; }
```

#### Property Value
[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')
### Methods

## EllipticCurveJsonWebKey\.Sanitize\(bool\) Method {#Abblix.Jwt.EllipticCurveJsonWebKey.Sanitize(bool)}

Prepares a sanitized version of the EC JWK that excludes private key information unless explicitly included\.

```csharp
public override Abblix.Jwt.JsonWebKey Sanitize(bool includePrivateKeys);
```
#### Parameters

###### `includePrivateKeys` [System\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean') {#Abblix.Jwt.EllipticCurveJsonWebKey.Sanitize(bool).includePrivateKeys}

Whether to include private key data in the sanitized output\.

#### Returns
[JsonWebKey](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.JsonWebKey 'Abblix\.Jwt\.JsonWebKey')  
A new instance of [EllipticCurveJsonWebKey](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.EllipticCurveJsonWebKey 'Abblix\.Jwt\.EllipticCurveJsonWebKey') with or without private key data based on the input parameter\.

#### Exceptions

[System\.InvalidOperationException](https://learn.microsoft.com/en-us/dotnet/api/system.invalidoperationexception 'System\.InvalidOperationException')  
Thrown when includePrivateKeys is true but the key contains no private key data\.
