Lines Matching refs:bfs

327     xl ^= bfs->pax[i]; \
328 xr ^= ((bfs->sbx[0][xl >> 24] + \
329 bfs->sbx[1][(xl & 0xFF0000) >> 16]) ^ \
330 bfs->sbx[2][(xl & 0xFF00) >> 8]) + \
331 bfs->sbx[3][xl & 0xFF];
334 xr ^= bfs->pax[i]; \
335 xl ^= ((bfs->sbx[0][xr >> 24] + \
336 bfs->sbx[1][(xr & 0xFF0000) >> 16]) ^ \
337 bfs->sbx[2][(xr & 0xFF00) >> 8]) + \
338 bfs->sbx[3][xr & 0xFF];
342 bf_state_T *bfs, in bf_e_block() argument
358 xl ^= bfs->pax[16]; in bf_e_block()
359 xr ^= bfs->pax[17]; in bf_e_block()
378 bf_state_T *bfs, in bf_e_cblock() argument
386 bf_e_block(bfs, &bk.ul[0], &bk.ul[1]); in bf_e_cblock()
398 bf_state_T *bfs, in bf_key_init() argument
430 mch_memmove(bfs->sbx, sbx_init, 4 * 4 * 256); in bf_key_init()
437 bfs->pax[i] = pax_init[i] ^ val; in bf_key_init()
443 bf_e_block(bfs, &data_l, &data_r); in bf_key_init()
444 bfs->pax[i + 0] = data_l; in bf_key_init()
445 bfs->pax[i + 1] = data_r; in bf_key_init()
452 bf_e_block(bfs, &data_l, &data_r); in bf_key_init()
453 bfs->sbx[i][j + 0] = data_l; in bf_key_init()
454 bfs->sbx[i][j + 1] = data_r; in bf_key_init()
560 bf_state_T *bfs, in bf_cfb_init() argument
566 bfs->randbyte_offset = bfs->update_offset = 0; in bf_cfb_init()
567 vim_memset(bfs->cfb_buffer, 0, bfs->cfb_len); in bf_cfb_init()
570 mi = seed_len > bfs->cfb_len ? seed_len : bfs->cfb_len; in bf_cfb_init()
572 bfs->cfb_buffer[i % bfs->cfb_len] ^= seed[i % seed_len]; in bf_cfb_init()
576 #define BF_CFB_UPDATE(bfs, c) { \ argument
577 bfs->cfb_buffer[bfs->update_offset] ^= (char_u)c; \
578 if (++bfs->update_offset == bfs->cfb_len) \
579 bfs->update_offset = 0; \
582 #define BF_RANBYTE(bfs, t) { \ argument
583 if ((bfs->randbyte_offset & BF_BLOCK_MASK) == 0) \
584 bf_e_cblock(bfs, &(bfs->cfb_buffer[bfs->randbyte_offset])); \
585 t = bfs->cfb_buffer[bfs->randbyte_offset]; \
586 if (++bfs->randbyte_offset == bfs->cfb_len) \
587 bfs->randbyte_offset = 0; \
602 bf_state_T *bfs = state->method_state; in crypt_blowfish_encode() local
609 BF_RANBYTE(bfs, t); in crypt_blowfish_encode()
610 BF_CFB_UPDATE(bfs, ztemp); in crypt_blowfish_encode()
626 bf_state_T *bfs = state->method_state; in crypt_blowfish_decode() local
632 BF_RANBYTE(bfs, t); in crypt_blowfish_decode()
634 BF_CFB_UPDATE(bfs, to[i]); in crypt_blowfish_decode()
647 bf_state_T *bfs = ALLOC_CLEAR_ONE(bf_state_T); in crypt_blowfish_init() local
649 if (bfs == NULL) in crypt_blowfish_init()
651 state->method_state = bfs; in crypt_blowfish_init()
655 bfs->cfb_len = state->method_nr == CRYPT_M_BF ? BF_MAX_CFB_LEN : BF_BLOCK; in crypt_blowfish_init()
660 bf_key_init(bfs, key, salt, salt_len); in crypt_blowfish_init()
661 bf_cfb_init(bfs, seed, seed_len); in crypt_blowfish_init()