Try to get the key in raw byte format. To be used for defining your own `CryptoProvider`.
(&self)
| 234 | /// |
| 235 | /// To be used for defining your own `CryptoProvider`. |
| 236 | pub fn try_get_as_bytes(&self) -> Result<&[u8]> { |
| 237 | match &self.kind { |
| 238 | DecodingKeyKind::SecretOrDer(b) => Ok(b), |
| 239 | DecodingKeyKind::RsaModulusExponent { .. } => Err(ErrorKind::InvalidKeyFormat.into()), |
| 240 | } |
| 241 | } |
| 242 | } |
| 243 | |
| 244 | impl TryFrom<&Jwk> for DecodingKey { |
no outgoing calls
no test coverage detected