Expand description
Functions for extracting and embedding claims within a WebAssembly module
Functions§
- This function will embed a set of claims inside the bytecode of a WebAssembly module. The claims are converted into a JWT and signed using the provided
KeyPair
. According to the WebAssembly custom section specification, arbitary sets of bytes can be stored in a WebAssembly module without impacting parsers or interpreters. Returns a vector of bytes representing the new WebAssembly module which can be saved to a.wasm
file - Extracts a set of claims from the raw bytes of a WebAssembly module. In the case where no JWT is discovered in the module, this function returns
None
. If there is a token in the file with a valid hash, then you will get aToken
back containing both the raw JWT and the decoded claims. - Sign a buffer containing bytes for a WebAssembly component with provided claims