_mm_encodekey128_u32 in core::arch::x86 - Rust
Description: Wrap a 128-bit AES key into a 384-bit key handle and stores it in `handle`. Returns the `control` parameter used to create the IWKey.

## _mm_encodekey128_u32

# Function _mm_encodekey128_u32

1.89.0 · Source

    pub unsafe fn _mm_encodekey128_u32(
        key_params: u32,
        key: __m128i,
        handle: *mut u8,
    ) -> u32

Available on x86 and target feature `kl` only.
Expand description

Wrap a 128-bit AES key into a 384-bit key handle and stores it in `handle`. Returns the `control` parameter used to create the IWKey.

- `key_params[0]`: If set, this key can only be used by the Kernel.
- `key_params[1]`: If set, this key can not be used to encrypt.
- `key_params[2]`: If set, this key can not be used to decrypt.
- `key_params[31:3]`: Reserved for future use, must be set to `0`.

Note that these restrictions need hardware support, and the supported restrictions can be found by calling `__cpuid(0x19)` and checking the `EAX[0:2]` bits. Failing to follow these restrictions may result in a General Protection Exception.

Intel’s documentation