| 41 | #[derive(Debug, Default, PartialEq, Eq, Hash, Copy, Clone, Serialize, Deserialize)] |
| 42 | #[non_exhaustive] |
| 43 | pub enum Algorithm { |
| 44 | /// HMAC using SHA-256 |
| 45 | #[default] |
| 46 | HS256, |
| 47 | /// HMAC using SHA-384 |
| 48 | HS384, |
| 49 | /// HMAC using SHA-512 |
| 50 | HS512, |
| 51 | |
| 52 | /// ECDSA using SHA-256 |
| 53 | ES256, |
| 54 | /// ECDSA using SHA-384 |
| 55 | ES384, |
| 56 | |
| 57 | /// RSASSA-PKCS1-v1_5 using SHA-256 |
| 58 | RS256, |
| 59 | /// RSASSA-PKCS1-v1_5 using SHA-384 |
| 60 | RS384, |
| 61 | /// RSASSA-PKCS1-v1_5 using SHA-512 |
| 62 | RS512, |
| 63 | |
| 64 | /// RSASSA-PSS using SHA-256 |
| 65 | PS256, |
| 66 | /// RSASSA-PSS using SHA-384 |
| 67 | PS384, |
| 68 | /// RSASSA-PSS using SHA-512 |
| 69 | PS512, |
| 70 | |
| 71 | /// Edwards-curve Digital Signature Algorithm (EdDSA) |
| 72 | EdDSA, |
| 73 | } |
| 74 | |
| 75 | impl FromStr for Algorithm { |
| 76 | type Err = Error; |
nothing calls this directly
no outgoing calls
no test coverage detected