Encrypt or decrypt data with a 128-bit block cipher in XTS mode.
Declared in <openssl/modes.h>
int
CRYPTO_xts128_encrypt(
XTS128_CONTEXT const* ctx,
unsigned char const iv[],
unsigned char const* inp,
unsigned char* out,
size_t len,
int enc);
0 on success, or -1 if len is invalid.
| Name | Description |
|---|---|
| ctx | XTS context holding the two keys and block functions. |
| iv | 16-byte tweak / sector IV for this unit. |
| inp | Input plaintext or ciphertext of length len (at least 16). |
| out | Output buffer of length len (may equal inp). |
| len | Number of bytes to process (must be >= 16). |
| enc | Non-zero to encrypt, zero to decrypt. |