LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
tomcrypt_cipher.h File Reference
#include "logicalaccess/plugins/crypto/lla_crypto_api.hpp"

Go to the source code of this file.

Classes

union  Symmetric_key
 
struct  ltc_cipher_descriptor
 

Typedefs

typedef union Symmetric_key symmetric_key
 

Functions

LLA_CRYPTO_API int find_cipher (const char *name)
 
int find_cipher_any (const char *name, int blocklen, int keylen)
 
int find_cipher_id (unsigned char ID)
 
LLA_CRYPTO_API int register_cipher (const struct ltc_cipher_descriptor *cipher)
 
LLA_CRYPTO_API int unregister_cipher (const struct ltc_cipher_descriptor *cipher)
 
LLA_CRYPTO_API int cipher_is_valid (int idx)
 

Variables

LLA_CRYPTO_API struct ltc_cipher_descriptor cipher_descriptor []
 

Typedef Documentation

◆ symmetric_key

Function Documentation

◆ cipher_is_valid()

LLA_CRYPTO_API int cipher_is_valid ( int  idx)

◆ find_cipher()

LLA_CRYPTO_API int find_cipher ( const char *  name)

Find a registered cipher by name

Parameters
nameThe name of the cipher to look for
Returns
>= 0 if found, -1 if not present

◆ find_cipher_any()

int find_cipher_any ( const char *  name,
int  blocklen,
int  keylen 
)

Find a cipher flexibly. First by name then if not present by block and key size

Parameters
nameThe name of the cipher desired
blocklenThe minimum length of the block cipher desired (octets)
keylenThe minimum length of the key size desired (octets)
Returns
>= 0 if found, -1 if not present

◆ find_cipher_id()

int find_cipher_id ( unsigned char  ID)

Find a cipher by ID number

Parameters
IDThe ID (not same as index) of the cipher to find
Returns
>= 0 if found, -1 if not present

◆ register_cipher()

LLA_CRYPTO_API int register_cipher ( const struct ltc_cipher_descriptor cipher)

Register a cipher with the descriptor table

Parameters
cipherThe cipher you wish to register
Returns
value >= 0 if successfully added (or already present), -1 if unsuccessful

◆ unregister_cipher()

LLA_CRYPTO_API int unregister_cipher ( const struct ltc_cipher_descriptor cipher)

Unregister a cipher from the descriptor table

Parameters
cipherThe cipher descriptor to remove
Returns
CRYPT_OK on success

Variable Documentation

◆ cipher_descriptor

LLA_CRYPTO_API struct ltc_cipher_descriptor cipher_descriptor[]