-define(CRYPTELA, cryptela).
-define(CRYPTELA_RESULT(TaskID, Type, Data), {?CRYPTELA, TaskID, Type, Data}).
-define(CRYPTELA_ERROR(TaskID, Data), ?CRYPTELA_RESULT(TaskID, error, Data)).
-define(CRYPTELA_DIGEST_DATA, 100).
-define(CRYPTELA_RANDOM_DATA, 101).
-define(CRYPTELA_SYMMETRIC_ENCRYPT, 102).
-define(CRYPTELA_SYMMETRIC_DECRYPT, 103).
-define(CRYPTELA_STORE_GETINFO, 200).
-define(CRYPTELA_STORE_CREATE, 201).
-define(CRYPTELA_CERT_EXPORT, 202).
-define(CRYPTELA_CERT_IMPORT, 203).
-define(CRYPTELA_CERT_ENCRYPT, 204).
-define(CRYPTELA_CERT_DECRYPT, 205).
-define(CRYPTELA_CERT_SIGN, 206).
-define(CRYPTELA_CERT_VERIFY, 207).
-define(CRYPTELA_CERT_EXPORT_PEM, 208).
-define(CRYPTELA_CERT_IMPORT_PEM, 209).
-define(CRYPTELA_STORE_REMOVE, 210).
-define(CRYPTELA_STORE_LISTCERTS, 211).
-define(CRYPTELA_CERT_OPTIONS(Country, Location, Province, Organization, Unit, EMail, ExpireDate, Title, Name, Surname, Initials, SerialNumber), [
{cert_country, Country},
{cert_location, Location},
{cert_province, Province},
{cert_organization, Organization},
{cert_organization_unit, Unit},
{cert_email, EMail},
{cert_expire_date, ExpireDate},
{cert_title, Title},
{cert_given_name, Name},
{cert_surname, Surname},
{cert_initials, Initials},
{cert_serial, SerialNumber}
]).
-define(CRYPTELA_CERT_SIGNER(Signer, Name, Password), [
{signer_store, Signer},
{signer_name, Name},
{signer_password, Password}
]).
-define(CRYPTELA_STORE_CREDENTIALS(Name, Password), [
{cert_name, Name},
{store_password, Password}
]).
-define(CRYPTELA_STORE_CREDENTIALS_MAC(Name, Password, MAC), [
{cert_name, Name},
{store_password, Password},
{store_mac_password, MAC}
]).
-define(CRYPTELA_DIGEST_DEFAULT, ?CRYPTELA_DIGEST_SHA1).
-define(CRYPTELA_DIGEST_MD4, "md4").
-define(CRYPTELA_DIGEST_MD5, "md5").
-define(CRYPTELA_DIGEST_SHA, "sha").
-define(CRYPTELA_DIGEST_SHA1, "sha1").
-define(CRYPTELA_DIGEST_SHA224, "sha224").
-define(CRYPTELA_DIGEST_SHA256, "sha256").
-define(CRYPTELA_DIGEST_SHA384, "sha384").
-define(CRYPTELA_DIGEST_SHA512, "sha512").
-define(CRYPTELA_DIGEST_RIPEMD160, "ripemd160").
-define(CRYPTELA_CIPHER_DEFAULT, ?CRYPTELA_CIPHER_AES_256_CBC).
-define(CRYPTELA_CIPHER_DES_ECB, "des_ecb").
-define(CRYPTELA_CIPHER_DES_EDE, "des_ede").
-define(CRYPTELA_CIPHER_DES_EDE3, "des_ede3").
-define(CRYPTELA_CIPHER_DES_EDE_ECB, "des_ede_ecb").
-define(CRYPTELA_CIPHER_DES_EDE3_ECB, "des_ede3_ecb").
-define(CRYPTELA_CIPHER_DES_CFB64, "des_cfb64").
-define(CRYPTELA_CIPHER_DES_CFB8, "des_cfb8").
-define(CRYPTELA_CIPHER_DES_EDE_CFB64, "des_ede_cfb64").
-define(CRYPTELA_CIPHER_DES_EDE3_CFB64, "des_ede3_cfb64").
-define(CRYPTELA_CIPHER_DES_EDE3_CFB8, "des_ede3_cfb8").
-define(CRYPTELA_CIPHER_DES_OFB, "des_ofb").
-define(CRYPTELA_CIPHER_DES_EDE_OFB, "des_ede_ofb").
-define(CRYPTELA_CIPHER_DES_EDE3_OFB, "des_ede3_ofb").
-define(CRYPTELA_CIPHER_DES_CBC, "des_cbc").
-define(CRYPTELA_CIPHER_DES_EDE_CBC, "des_ede_cbc").
-define(CRYPTELA_CIPHER_DES_EDE3_CBC, "des_ede3_cbc").
-define(CRYPTELA_CIPHER_DESX_CBC, "desx_cbc").
-define(CRYPTELA_CIPHER_AES_128_ECB, "aes_128_ecb").
-define(CRYPTELA_CIPHER_AES_128_CBC, "aes_128_cbc").
-define(CRYPTELA_CIPHER_AES_128_CFB1, "aes_128_cfb1").
-define(CRYPTELA_CIPHER_AES_128_CFB8, "aes_128_cfb8").
-define(CRYPTELA_CIPHER_AES_128_CFB128, "aes_128_cfb128").
-define(CRYPTELA_CIPHER_AES_128_OFB, "aes_128_ofb").
-define(CRYPTELA_CIPHER_AES_192_ECB, "aes_192_ecb").
-define(CRYPTELA_CIPHER_AES_192_CBC, "aes_192_cbc").
-define(CRYPTELA_CIPHER_AES_192_CFB1, "aes_192_cfb1").
-define(CRYPTELA_CIPHER_AES_192_CFB8, "aes_192_cfb8").
-define(CRYPTELA_CIPHER_AES_192_CFB128, "aes_192_cfb128").
-define(CRYPTELA_CIPHER_AES_192_OFB, "aes_192_ofb").
-define(CRYPTELA_CIPHER_AES_256_ECB, "aes_256_ecb").
-define(CRYPTELA_CIPHER_AES_256_CBC, "aes_256_cbc").
-define(CRYPTELA_CIPHER_AES_256_CFB1, "aes_256_cfb1").
-define(CRYPTELA_CIPHER_AES_256_CFB8, "aes_256_cfb8").
-define(CRYPTELA_CIPHER_AES_256_CFB128, "aes_256_cfb128").
-define(CRYPTELA_CIPHER_AES_256_OFB, "aes_256_ofb").
-define(CRYPTELA_CIPHER_RC4, "rc4").
-define(CRYPTELA_CIPHER_RC4_40, "rc4_40").
-define(CRYPTELA_CIPHER_RC2_ECB, "rc2_ecb").
-define(CRYPTELA_CIPHER_RC2_CBC, "rc2_cbc").
-define(CRYPTELA_CIPHER_RC2_40_CBC, "rc2_40_cbc").
-define(CRYPTELA_CIPHER_RC2_64_CBC, "rc2_64_cbc").
-define(CRYPTELA_CIPHER_RC2_CFB64, "rc2_cfb64").
-define(CRYPTELA_CIPHER_RC2_OFB, "rc2_ofb").
-define(CRYPTELA_CIPHER_BF_ECB, "bf_ecb").
-define(CRYPTELA_CIPHER_BF_CBC, "bf_cbc").
-define(CRYPTELA_CIPHER_BF_CFB64, "bf_cfb64").
-define(CRYPTELA_CIPHER_BF_OFB, "bf_ofb").
-define(CRYPTELA_CIPHER_CAST5_ECB, "cast5_ecb").
-define(CRYPTELA_CIPHER_CAST5_CBC, "cast5_cbc").
-define(CRYPTELA_CIPHER_CAST5_CFB64, "cast5_cfb64").
-define(CRYPTELA_CIPHER_CAST5_OFB, "cast5_ofb").
|