• Home
  • Raw
  • Download

Lines Matching refs:hd

17 	gcry_md_hd_t hd;  in md4_vector()  local
21 if (gcry_md_open(&hd, GCRY_MD_MD4, 0) != GPG_ERR_NO_ERROR) in md4_vector()
24 gcry_md_write(hd, addr[i], len[i]); in md4_vector()
25 p = gcry_md_read(hd, GCRY_MD_MD4); in md4_vector()
28 gcry_md_close(hd); in md4_vector()
35 gcry_cipher_hd_t hd; in des_encrypt() local
48 gcry_cipher_open(&hd, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0); in des_encrypt()
49 gcry_err_code(gcry_cipher_setkey(hd, pkey, 8)); in des_encrypt()
50 gcry_cipher_encrypt(hd, cypher, 8, clear, 8); in des_encrypt()
51 gcry_cipher_close(hd); in des_encrypt()
57 gcry_md_hd_t hd; in md5_vector() local
61 if (gcry_md_open(&hd, GCRY_MD_MD5, 0) != GPG_ERR_NO_ERROR) in md5_vector()
64 gcry_md_write(hd, addr[i], len[i]); in md5_vector()
65 p = gcry_md_read(hd, GCRY_MD_MD5); in md5_vector()
68 gcry_md_close(hd); in md5_vector()
75 gcry_md_hd_t hd; in sha1_vector() local
79 if (gcry_md_open(&hd, GCRY_MD_SHA1, 0) != GPG_ERR_NO_ERROR) in sha1_vector()
82 gcry_md_write(hd, addr[i], len[i]); in sha1_vector()
83 p = gcry_md_read(hd, GCRY_MD_SHA1); in sha1_vector()
86 gcry_md_close(hd); in sha1_vector()
93 gcry_cipher_hd_t hd; in aes_encrypt_init() local
95 if (gcry_cipher_open(&hd, GCRY_CIPHER_AES, GCRY_CIPHER_MODE_ECB, 0) != in aes_encrypt_init()
100 if (gcry_cipher_setkey(hd, key, len) != GPG_ERR_NO_ERROR) { in aes_encrypt_init()
102 gcry_cipher_close(hd); in aes_encrypt_init()
106 return hd; in aes_encrypt_init()
112 gcry_cipher_hd_t hd = ctx; in aes_encrypt() local
113 gcry_cipher_encrypt(hd, crypt, 16, plain, 16); in aes_encrypt()
119 gcry_cipher_hd_t hd = ctx; in aes_encrypt_deinit() local
120 gcry_cipher_close(hd); in aes_encrypt_deinit()
126 gcry_cipher_hd_t hd; in aes_decrypt_init() local
128 if (gcry_cipher_open(&hd, GCRY_CIPHER_AES, GCRY_CIPHER_MODE_ECB, 0) != in aes_decrypt_init()
131 if (gcry_cipher_setkey(hd, key, len) != GPG_ERR_NO_ERROR) { in aes_decrypt_init()
132 gcry_cipher_close(hd); in aes_decrypt_init()
136 return hd; in aes_decrypt_init()
142 gcry_cipher_hd_t hd = ctx; in aes_decrypt() local
143 gcry_cipher_decrypt(hd, plain, 16, crypt, 16); in aes_decrypt()
149 gcry_cipher_hd_t hd = ctx; in aes_decrypt_deinit() local
150 gcry_cipher_close(hd); in aes_decrypt_deinit()