HASH

This is the interface for accesing hardware hashing accelerators.

Details

define HASH_VERSION

define HASH_IOC_CHAR

define I_HASH_GETVERSION

define I_HASH_GETINFO

This request reads the random generator information.

Example:

hash_info_t info;
ioctl(fildes, I_HASH_GETINFO, &info);

define I_HASH_SETATTR

Requests the hardware to write the random generator attributes.

Example:

hash_attr_t attr;
attr.o_flags = HASH_FLAG_SET_SEED;
attr.seed = 10;
ioctl(fildes, I_HASH_SETATTR, &attr);

enum @16
  • HASH_FLAG_SET Set the hash algorithm settings
  • HASH_FLAG_IS_MD1 Sets the algorithm MD1 use with HASH_FLAG_SET
  • HASH_FLAG_IS_SHA1 Sets the algorithm SHA1 use with HASH_FLAG_SET
  • HASH_FLAG_IS_MD5 Sets the algorithm MD5 use with HASH_FLAG_SET
  • HASH_FLAG_IS_SHA224 Sets the algorithm SHA224 use with HASH_FLAG_SET
  • HASH_FLAG_IS_SHA256 Sets the algorithm SHA256 use with HASH_FLAG_SET
  • HASH_FLAG_IS_DATA_8 Sets the data size to a 8-bits
  • HASH_FLAG_IS_DATA_16 Sets the data size to a 16-bits
  • HASH_FLAG_IS_DATA_32 Sets the data size to a 32-bits

struct::hash_info_t

u32 o_flags

Bitwise flags

u32 resd

struct::hash_attr_t

u32 o_flags

Bitwise flags

u32 resd

X

Thanks for Coming!

Subscribe to news and updates