A list of all possible Algorithms that are part of the family.
(&self)
| 20 | impl AlgorithmFamily { |
| 21 | /// A list of all possible Algorithms that are part of the family. |
| 22 | pub fn algorithms(&self) -> &[Algorithm] { |
| 23 | match self { |
| 24 | Self::Hmac => &[Algorithm::HS256, Algorithm::HS384, Algorithm::HS512], |
| 25 | Self::Rsa => &[ |
| 26 | Algorithm::RS256, |
| 27 | Algorithm::RS384, |
| 28 | Algorithm::RS512, |
| 29 | Algorithm::PS256, |
| 30 | Algorithm::PS384, |
| 31 | Algorithm::PS512, |
| 32 | ], |
| 33 | Self::Ec => &[Algorithm::ES256, Algorithm::ES384], |
| 34 | Self::Ed => &[Algorithm::EdDSA], |
| 35 | } |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | /// The algorithms supported for signing/verifying JWTs |