Lines Matching refs:mech
601 init_mech(crypto_mechanism_t *mech, crypto_test_alg_t alg, in init_mech() argument
609 mech->cm_type = crypto_mech2id(SUN_CKM_AES_GCM); in init_mech()
610 mech->cm_param_len = sizeof (CK_AES_GCM_PARAMS); in init_mech()
611 CK_AES_GCM_PARAMS *p = (CK_AES_GCM_PARAMS *)mech->cm_param; in init_mech()
621 mech->cm_type = crypto_mech2id(SUN_CKM_AES_CCM); in init_mech()
622 mech->cm_param_len = sizeof (CK_AES_CCM_PARAMS); in init_mech()
623 CK_AES_CCM_PARAMS *p = (CK_AES_CCM_PARAMS *)mech->cm_param; in init_mech()
651 encrypt_one(crypto_mechanism_t *mech, in encrypt_one() argument
686 int rv = crypto_encrypt(mech, &i, &k, NULL, &o); in encrypt_one()
709 decrypt_one(crypto_mechanism_t *mech, in decrypt_one() argument
749 int rv = crypto_decrypt(mech, &i, &k, NULL, &o); in decrypt_one()
944 crypto_mechanism_t mech = {}; in run_tests() local
949 mech.cm_param = (caddr_t)¶ms; in run_tests()
960 init_mech(&mech, test->alg, test->iv.val, test->iv.len, in run_tests()
963 int encrypt_rv = encrypt_one(&mech, in run_tests()
969 init_mech(&mech, test->alg, test->iv.val, test->iv.len, in run_tests()
972 int decrypt_rv = decrypt_one(&mech, in run_tests()
1097 crypto_mechanism_t mech = {}; in perf_alg_cb() local
1102 mech.cm_param = (caddr_t)¶ms; in perf_alg_cb()
1110 init_mech(&mech, args->alg, args->iv, sizeof (args->iv), in perf_alg_cb()
1117 encrypt_one(&mech, args->key, sizeof (args->key), in perf_alg_cb()