Skip to content

Commit d7a8df9

Browse files
committed
Use hexadecimal format for opcode values
Also adds a link checker on the CI. Signed-off-by: Hugues de Valon <[email protected]>
1 parent ce3590d commit d7a8df9

File tree

2 files changed

+33
-21
lines changed

2 files changed

+33
-21
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ jobs:
77
name: Build and check formatting
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v1
10+
- uses: actions/checkout@v2
1111
- name: Execute all tests
1212
run: ./tests/ci.sh
13+
14+
links:
15+
name: Check links
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Link Checker
20+
uses: peter-evans/link-checker@v1
21+
with:
22+
args: -v -r *.md
23+
- name: Fail if there were link errors
24+
run: exit ${{ steps.lc.outputs.exit_code }}

src/requests/mod.rs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -74,45 +74,45 @@ pub enum BodyType {
7474
#[repr(u32)]
7575
pub enum Opcode {
7676
/// Ping operation
77-
Ping = 1,
77+
Ping = 0x0001,
7878
/// PsaGenerateKey operation
79-
PsaGenerateKey = 2,
79+
PsaGenerateKey = 0x0002,
8080
/// PsaDestroyKey operation
81-
PsaDestroyKey = 3,
81+
PsaDestroyKey = 0x0003,
8282
/// PsaSignHash operation
83-
PsaSignHash = 4,
83+
PsaSignHash = 0x0004,
8484
/// PsaVerifyHash operation
85-
PsaVerifyHash = 5,
85+
PsaVerifyHash = 0x0005,
8686
/// PsaImportKey operation
87-
PsaImportKey = 6,
87+
PsaImportKey = 0x0006,
8888
/// PsaExportPublicKey operation
89-
PsaExportPublicKey = 7,
89+
PsaExportPublicKey = 0x0007,
9090
/// ListProviders operation
91-
ListProviders = 8,
91+
ListProviders = 0x0008,
9292
/// ListOpcodes operation
93-
ListOpcodes = 9,
93+
ListOpcodes = 0x0009,
9494
/// PsaAsymmetricEncrypt operation
95-
PsaAsymmetricEncrypt = 10,
95+
PsaAsymmetricEncrypt = 0x000A,
9696
/// PsaAsymmetricDecrypt operation
97-
PsaAsymmetricDecrypt = 11,
97+
PsaAsymmetricDecrypt = 0x000B,
9898
/// PsaExportKey operation
99-
PsaExportKey = 12,
99+
PsaExportKey = 0x000C,
100100
/// PsaGenerateRandom operation
101-
PsaGenerateRandom = 13,
101+
PsaGenerateRandom = 0x000D,
102102
/// ListAuthenticators operation
103-
ListAuthenticators = 14,
103+
ListAuthenticators = 0x000E,
104104
/// PsaHashCompute operation
105-
PsaHashCompute = 15,
105+
PsaHashCompute = 0x000F,
106106
/// PsaHashCompare operation
107-
PsaHashCompare = 16,
107+
PsaHashCompare = 0x0010,
108108
/// PsaAeadEncrypt
109-
PsaAeadEncrypt = 17,
109+
PsaAeadEncrypt = 0x0011,
110110
/// PsaAeadDecrypt
111-
PsaAeadDecrypt = 18,
111+
PsaAeadDecrypt = 0x0012,
112112
/// PsaRawKeyAgreement operation
113-
PsaRawKeyAgreement = 19,
113+
PsaRawKeyAgreement = 0x0013,
114114
/// ListKeys operations
115-
ListKeys = 26,
115+
ListKeys = 0x001A,
116116
}
117117

118118
/// Listing of available authentication methods.

0 commit comments

Comments
 (0)