tfCryptoEngineAddAlgorithm
Table of Contents >> Optional Protocols >> Cryptography
#include <trsecapi.h> |
int tfCryptoEngineAddAlgorithm | ( |
ttCryptoEnginePtr cenginePtr, | |
unsigned int algorithmId | |
); |
Function Description
This function adds the supported algorithm to the crypto engine. Some crypto engines may support more algorithms than others. For example, the HIFN7951 crypto engine only supports MD5, SHA1, DES, 3DES; it does not support AES algorithm.
Parameters
- cenginePtr
- The pointer to the crypto engine.
- algorithmId
- Algorithms to add to the given crypto engine (see below).
Possible 'algorithmId' Values
Name | Description |
---|---|
SADB_AALG_NULL | NULL hashing algorithm |
SADB_AALG_MD5HMAC | MD5 hashing algorithm |
SADB_AALG_SHA1HMAC | SHA1 hashing algorithm |
SADB_AALG_RIPEMDHMAC | RIPEMD hashing algorithm |
SADB_AALG_MD2HMAC | MD2 hashing algorithm |
SADB_AALG_SHA256HMAC | SHA256 hashing algorithm |
SADB_AALG_SHA384HMAC | SHA384 hashing algorithm |
SADB_AALG_SHA512HMAC | SHA512 hashing algorithm |
SADB_AALG_AESXCBCMAC | AESXCBC hashing algorithm |
SADB_EALG_NULL | NULL encryption algorithm |
SADB_EALG_RC2CBC | RC2 algorithm |
SADB_EALG_DESIV64CBC | DESIV64 encryption algorithm |
SADB_EALG_DESCBC | DES algorithm |
SADB_EALG_3DESCBC | 3DES algorithm |
SADB_EALG_ARCFOUR | RC4 algorithm |
SADB_EALG_RC5CBC | RC5 algorithm |
SADB_EALG_IDEACBC | IDEA algorithm |
SADB_EALG_CAST128CBC | CAST128 algorithm |
SADB_EALG_BLOWFISHCBC | BLOWFISH algorithm |
SADB_EALG_3IDEACBC | 3IDEA algorithm |
SADB_EALG_AESCBC | AES algorithm |
SADB_EALG_TWOFISHCBC | TWO FISH algorithm |
SADB_EALG_AESCTR | AESCTR algorithm |
SADB_EALG_AESCCM8 | AESCCM8 algorithm |
SADB_EALG_AESCCM12 | AESCCM12 algorithm |
SADB_EALG_AESCCM16 | AESCCM16 algorithm |
SADB_PUBKEY_NULL | NULL pubkey algorithm |
SADB_PUBKEY_RSA | RSA algorithm |
SADB_PUBKEY_DSA | DSA algorithm |
SADB_PUBKEY_DIFFIEHELLEMAN1 | DH group1 |
SADB_PUBKEY_DIFFIEHELLEMAN2 | DH group 2 |
SADB_PUBKEY_DIFFIEHELLEMAN5 | DH group 5 |
SADB_PUBKEY_DIFFIEHELLEMAN14 | DH group 14 |
SADB_PUBKEY_X509 | X.509 certificate |
Returns
- TM_ENOERROR
- Success.
- -1
- One of the parameters is invalid.