mirror of
https://github.com/trussed-dev/iso7816.git
synced 2026-06-20 04:16:14 -07:00
Make apdu-dispatch build standalone and fix tests
This commit is contained in:
committed by
Nicolas Stalder
parent
72bb691158
commit
1dca0fa36c
@@ -35,6 +35,25 @@ impl core::convert::From<u8> for Instruction {
|
||||
}
|
||||
}
|
||||
|
||||
impl core::convert::Into<u8> for Instruction {
|
||||
fn into(self) -> u8 {
|
||||
match self {
|
||||
Instruction::Verify => 0x20,
|
||||
Instruction::ChangeReferenceData => 0x24,
|
||||
Instruction::ResetRetryCounter => 0x2c,
|
||||
Instruction::GenerateAsymmetricKeyPair => 0x47,
|
||||
Instruction::GeneralAuthenticate => 0x87,
|
||||
Instruction::Select => 0xa4,
|
||||
Instruction::GetResponse => 0xc0,
|
||||
Instruction::GetData => 0xcb,
|
||||
Instruction::PutData => 0xdb,
|
||||
Instruction::ReadBinary => 0xb0,
|
||||
Instruction::WriteBinary => 0xd0,
|
||||
Instruction::Unknown(ins) => ins,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// impl core::convert::TryFrom<u8> for Instruction {
|
||||
// type Error = UnknownInstruction;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user