Lines Matching refs:mech_type

58 static int ucrypto_common_init(crypto_ctx_t *context, ucrypto_mech_t mech_type,
65 static int ucrypto_atomic(ucrypto_mech_t mech_type, uchar_t *key_str,
73 ucrypto_mech_t mech_type);
74 static int set_mechanism(crypto_mechanism_t *mech, ucrypto_mech_t mech_type,
180 ucrypto_mech_t mech_type)
182 switch (mech_type) {
224 set_mechanism(crypto_mechanism_t *mech, ucrypto_mech_t mech_type,
227 if (mech_type == CRYPTO_AES_ECB && iv_len != 0)
230 mech->cm_type = mech_type;
249 ucrypto_common_init(crypto_ctx_t *context, ucrypto_mech_t mech_type,
257 rv = set_mechanism(&mech, mech_type, iv, iv_len);
261 rv = set_key(&key, key_str, key_len, mech_type);
462 ucrypto_atomic(ucrypto_mech_t mech_type, uchar_t *key_str, size_t key_len,
478 switch (mech_type) {
497 mech_type = CRYPTO_AES_CBC;
509 mech_type = CRYPTO_AES_CBC;
518 rv = set_mechanism(&mech, mech_type, iv, iv_len);
522 rv = set_key(&key, key_str, key_len, mech_type);
537 switch (mech_type) {
614 ucrypto_encrypt_init(crypto_ctx_t *context, ucrypto_mech_t mech_type,
617 return (ucrypto_common_init(context, mech_type, key_str, key_len,
652 #define GET_RAWDATA_FUNCS(mech_type) \
653 switch (mech_type) { \
658 funcs = rawdata_get_aes_funcs(mech_type); \
667 ucrypto_encrypt(ucrypto_mech_t mech_type, uchar_t *key_str, size_t key_len,
673 GET_RAWDATA_FUNCS(mech_type);
684 return (ucrypto_atomic(mech_type, key_str, key_len, iv, iv_len, in,
690 ucrypto_decrypt_init(crypto_ctx_t *context, ucrypto_mech_t mech_type,
693 return (ucrypto_common_init(context, mech_type, key_str, key_len,
728 ucrypto_decrypt(ucrypto_mech_t mech_type, uchar_t *key_str, size_t key_len,
734 GET_RAWDATA_FUNCS(mech_type);
744 return (ucrypto_atomic(mech_type, key_str, key_len, iv, iv_len, in,
750 ucrypto_sign_init(crypto_ctx_t *context, ucrypto_mech_t mech_type,
753 return (ucrypto_common_init(context, mech_type, key_str, key_len,
772 ucrypto_sign(ucrypto_mech_t mech_type, uchar_t *key_str, size_t key_len,
776 return (ucrypto_atomic(mech_type, key_str, key_len, iv, iv_len,
782 ucrypto_verify_init(crypto_ctx_t *context, ucrypto_mech_t mech_type,
785 return (ucrypto_common_init(context, mech_type, key_str, key_len,
804 ucrypto_verify(ucrypto_mech_t mech_type, uchar_t *key_str, size_t key_len,
808 return (ucrypto_atomic(mech_type, key_str, key_len, iv, iv_len,