Lines Matching refs:pad_len
186 int i, pad_len; in osdp_encrypt_data() local
190 pad_len = AES_PAD_LEN(length + 1); in osdp_encrypt_data()
191 if ((pad_len - length - 1) > 0) { in osdp_encrypt_data()
192 memset(data + length + 1, 0, pad_len - length - 1); in osdp_encrypt_data()
199 osdp_encrypt(pd->sc.s_enc, iv, data, pad_len); in osdp_encrypt_data()
201 return pad_len; in osdp_encrypt_data()
207 int pad_len; in osdp_compute_mac() local
212 pad_len = (len % 16 == 0) ? len : AES_PAD_LEN(len); in osdp_compute_mac()
224 if (pad_len > 16) { in osdp_compute_mac()
226 osdp_encrypt(pd->sc.s_mac1, iv, buf, pad_len - 16); in osdp_compute_mac()
228 memcpy(iv, buf + pad_len - 32, 16); in osdp_compute_mac()
232 osdp_encrypt(pd->sc.s_mac2, iv, buf + pad_len - 16, 16); in osdp_compute_mac()
233 memcpy(is_cmd ? pd->sc.c_mac : pd->sc.r_mac, buf + pad_len - 16, 16); in osdp_compute_mac()