Module proxy_reencryption_lib::utils
source · Expand description
This module provides various cryptographic utilities.
It includes functions for hashing, XOR operations, encryption, and generating random arrays.
The hash function computes the SHA-256 hash of the input data and returns the first 16 bytes.
The xor function performs a bitwise XOR operation on two arrays of the same size.
The encrypt function encrypts a 128-bit plaintext using AES-128 in ECB mode.
The new_random_arr function generates a new random array of a specified size.
Functions§
- Encrypts a 128-bit plaintext using AES-128 in ECB mode.
- Computes the SHA-256 hash of the input data then get the first 16 byte.
- Generates a new random array of a specified size.
- Performs a bitwise XOR operation on two arrays of the same size.