Try to get the key in raw byte format. To be used for defining your own `CryptoProvider`.
(&self)
| 243 | /// |
| 244 | /// To be used for defining your own `CryptoProvider`. |
| 245 | pub fn try_get_as_bytes(&self) -> Result<&[u8]> { |
| 246 | match &self.kind { |
| 247 | DecodingKeyKind::SecretOrDer(b) => Ok(b), |
| 248 | DecodingKeyKind::RsaModulusExponent { .. } => Err(ErrorKind::InvalidKeyFormat.into()), |
| 249 | } |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | impl TryFrom<&Jwk> for DecodingKey { |
no outgoing calls
no test coverage detected