(s: &str)
| 42 | //7 values, can be max 255 (u8) 0b11111111 |
| 43 | Encrypt, |
| 44 | Decrypt, |
| 45 | WrapKey, |
| 46 | UnwrapKey, |
| 47 | Sign, |
| 48 | Verify, |
| 49 | DeriveKey, |
| 50 | DeriveBits, |
| 51 | } |
| 52 | |
| 53 | impl TryFrom<&str> for KeyUsage { |
| 54 | type Error = String; |
| 55 | |
| 56 | fn try_from(s: &str) -> std::result::Result<Self, Self::Error> { |
| 57 | Ok(match s { |
| 58 | "encrypt" => KeyUsage::Encrypt, |
| 59 | "decrypt" => KeyUsage::Decrypt, |