| 16 | } |
| 17 | |
| 18 | WasiCryptoExpect<size_t> |
| 19 | Context::arrayOutputPull(__wasi_array_output_t ArrayOutputHandle, |
| 20 | Span<uint8_t> Buf) noexcept { |
| 21 | return ArrayOutputManager.get(ArrayOutputHandle) |
| 22 | .map([=](Common::ArrayOutput &ArrayOutput) noexcept { |
| 23 | auto [Size, AlreadyConsumed] = ArrayOutput.pull(Buf); |
| 24 | if (AlreadyConsumed) { |
| 25 | ArrayOutputManager.close(ArrayOutputHandle); |
| 26 | } |
| 27 | return Size; |
| 28 | }); |
| 29 | } |
| 30 | |
| 31 | WasiCryptoExpect<__wasi_options_t> |
| 32 | Context::optionsOpen(__wasi_algorithm_type_e_t AlgType) noexcept { |