Wrapper for libtomcrypt DES encryption functions.
More...
Go to the source code of this file.
|
int | EncryptDES (const unsigned char *key, unsigned char *ct, const unsigned char *pt) |
| Encrypts an 8-byte array using DES. More...
|
|
int | DecryptDES (const unsigned char *key, const unsigned char *ct, unsigned char *pt) |
| Encrypts an 8-byte array using DES. More...
|
|
void | createDESKey (const uint8_t *bytes, uint8_t *key) |
| Creates an 8-byte DES key. More...
|
|
int | MD4Hash (const unsigned char *buf, int length, unsigned char *hash) |
| Generates a MD4 Message-Digest Algorithm. More...
|
|
Wrapper for libtomcrypt DES encryption functions.
void createDESKey |
( |
const uint8_t * |
bytes, |
|
|
uint8_t * |
key |
|
) |
| |
Creates an 8-byte DES key.
- Parameters
-
[in] | bytes | TBD |
[out] | key | A pointer which will store the 8-byte key. |
- Returns
- Nothing.
int DecryptDES |
( |
const unsigned char * |
key, |
|
|
const unsigned char * |
ct, |
|
|
unsigned char * |
pt |
|
) |
| |
Encrypts an 8-byte array using DES.
- Parameters
-
[in] | key | A pointer to the 8-byte key. [in] ct A pointer to the 8-byte array to be decrypted. |
[out] | pt | A pointer which will store the decrypted data. |
- Returns
- #TW_OK if successful, positive integral on error code (see twErrors.h) if an error was encountered.
int EncryptDES |
( |
const unsigned char * |
key, |
|
|
unsigned char * |
ct, |
|
|
const unsigned char * |
pt |
|
) |
| |
Encrypts an 8-byte array using DES.
- Parameters
-
[in] | key | A pointer to the 8-byte key. [out] ct A pointer which will store the encrypted data. |
[in] | pt | A pointer to the 8-byte array to be encrypted. |
- Returns
- #TW_OK if successful, positive integral on error code (see twErrors.h) if an error was encountered.
int MD4Hash |
( |
const unsigned char * |
buf, |
|
|
int |
length, |
|
|
unsigned char * |
hash |
|
) |
| |
Generates a MD4 Message-Digest Algorithm.
- Parameters
-
[in] | buf | A buffer containing the hash message. |
[in] | length | The length of |
[out] | hash | A pointer which will store the generated MD4 hash. |
- Returns
- Always returns 0.