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

## KeySizeFloors Class

The smallest keys RFC 7518 permits, and the section stating each floor, so a refusal can cite the paragraph
that refused\.

```csharp
public static class KeySizeFloors
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → KeySizeFloors
### Fields

## KeySizeFloors\.MinimumRsaKeyBits Field {#Abblix.Jwt.KeySizeFloors.MinimumRsaKeyBits}

The smallest RSA modulus RFC 7518 permits\. Four sections state it, one per family: Section 3\.3
and Section 3\.5 for signing, Section 4\.2 and Section 4\.3 for key encryption\. Almost the same
words \- 3\.3 and 4\.3 govern several algorithms and say "these", 3\.5 and 4\.2 govern one and say
"this"\. One number here, so the sites that enforce it cannot drift apart\.

```csharp
public const int MinimumRsaKeyBits = 2048;
```

#### Field Value
[System\.Int32](https://learn.microsoft.com/en-us/dotnet/api/system.int32 'System\.Int32')
### Methods

## KeySizeFloors\.RsaSectionFor\(string\) Method {#Abblix.Jwt.KeySizeFloors.RsaSectionFor(string)}

The RFC 7518 section that carries the key\-size requirement for [algorithm](https://www.abblix.com/docs/api/abblix-jwt/Abblix.Jwt.KeySizeFloors#Abblix.Jwt.KeySizeFloors.RsaSectionFor(string).algorithm 'Abblix\.Jwt\.KeySizeFloors\.RsaSectionFor\(string\)\.algorithm')\.

```csharp
public static string RsaSectionFor(string algorithm);
```
#### Parameters

###### `algorithm` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Jwt.KeySizeFloors.RsaSectionFor(string).algorithm}

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

#### Exceptions

[System\.ArgumentException](https://learn.microsoft.com/en-us/dotnet/api/system.argumentexception 'System\.ArgumentException')  
The algorithm is not one this library enforces a floor for\.

### Remarks
A refusal has to send the operator to the paragraph that refused them\. Sections 3 and 4 are
container headings and state no size requirement at all, so citing either leaves the reader
looking at a table of algorithm names and no MUST \- which reads as the library inventing the rule\.

## KeySizeFloors\.RsaSectionForOrNothing\(string\) Method {#Abblix.Jwt.KeySizeFloors.RsaSectionForOrNothing(string)}

The WHOLE citation phrase, ready to drop into a refusal message \- "per RFC 7518 Section 3\.3", or
"for RSA signatures" when the algorithm has no section of its own\.

```csharp
public static string RsaSectionForOrNothing(string algorithm);
```
#### Parameters

###### `algorithm` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Jwt.KeySizeFloors.RsaSectionForOrNothing(string).algorithm}

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

### Remarks
Two differences from [RsaSectionFor\(string\)](https://www.abblix.com/docs/api/abblix-jwt/Abblix.Jwt.KeySizeFloors#Abblix.Jwt.KeySizeFloors.RsaSectionFor(string) 'Abblix\.Jwt\.KeySizeFloors\.RsaSectionFor\(string\)'), and both matter at a call site\. This one never
throws for a non\-null algorithm, because an unknown algorithm must not replace the refusal the
operator was about to read with a complaint about the citation \- and it is reachable, since an RSA
key carrying no `alg` resolves to `SigningAlgorithms.None`\. And this one carries the words
"per RFC 7518" itself, where [RsaSectionFor\(string\)](https://www.abblix.com/docs/api/abblix-jwt/Abblix.Jwt.KeySizeFloors#Abblix.Jwt.KeySizeFloors.RsaSectionFor(string) 'Abblix\.Jwt\.KeySizeFloors\.RsaSectionFor\(string\)') returns the bare section and leaves them to the
caller\. Interpolate this one into a sentence that writes them too and the message says them twice\.
