- added SC_ALGORITHM_{MD5,SHA1,PBKDF2,PBES2} and corresponding

AlgorithmIdentifier parameter structs
- added params pointer to struct sc_algorithm_id


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@529 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
okir 2002-04-17 08:56:58 +00:00
parent 5eb1921a64
commit b4d224b5a1
1 changed files with 24 additions and 0 deletions

View File

@ -147,6 +147,16 @@ extern "C" {
#define SC_ALGORITHM_DES 64
#define SC_ALGORITHM_3DES 65
/* Hash algorithms */
#define SC_ALGORITHM_MD5 128
#define SC_ALGORITHM_SHA1 129
/* Key derivation algorithms */
#define SC_ALGORITHM_PBKDF2 192
/* Key encryption algoprithms */
#define SC_ALGORITHM_PBES2 256
#define SC_ALGORITHM_ONBOARD_KEY_GEN 0x80000000
#define SC_ALGORITHM_SPECIFIC_FLAGS 0x0000FFFF
@ -181,6 +191,20 @@ typedef struct sc_security_env sc_security_env_t;
struct sc_algorithm_id {
unsigned int algorithm;
struct sc_object_id obj_id;
void *params;
};
struct sc_pbkdf2_params {
u8 salt[16];
size_t salt_len;
int iterations;
int key_length;
struct sc_algorithm_id hash_alg;
};
struct sc_pbes2_params {
struct sc_algorithm_id derivation_alg;
struct sc_algorithm_id key_encr_alg;
};
struct sc_algorithm_info {