Lines Matching refs:data
415 Blowfish_stream2word(const uint8_t *data, uint16_t databytes, uint16_t *current) in Blowfish_stream2word() argument
427 temp = (temp << 8) | data[j]; in Blowfish_stream2word()
473 Blowfish_expandstate(blf_ctx *c, const uint8_t *data, uint16_t databytes, in Blowfish_expandstate() argument
494 datal ^= Blowfish_stream2word(data, databytes, &j); in Blowfish_expandstate()
495 datar ^= Blowfish_stream2word(data, databytes, &j); in Blowfish_expandstate()
504 datal ^= Blowfish_stream2word(data, databytes, &j); in Blowfish_expandstate()
505 datar ^= Blowfish_stream2word(data, databytes, &j); in Blowfish_expandstate()
525 blf_enc(blf_ctx *c, uint32_t *data, uint16_t blocks) in blf_enc() argument
530 d = data; in blf_enc()
538 blf_dec(blf_ctx *c, uint32_t *data, uint16_t blocks) in blf_dec() argument
543 d = data; in blf_dec()
551 blf_ecb_encrypt(blf_ctx *c, uint8_t *data, uint32_t len) in blf_ecb_encrypt() argument
557 l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3]; in blf_ecb_encrypt()
558 r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]; in blf_ecb_encrypt()
560 data[0] = l >> 24 & 0xff; in blf_ecb_encrypt()
561 data[1] = l >> 16 & 0xff; in blf_ecb_encrypt()
562 data[2] = l >> 8 & 0xff; in blf_ecb_encrypt()
563 data[3] = l & 0xff; in blf_ecb_encrypt()
564 data[4] = r >> 24 & 0xff; in blf_ecb_encrypt()
565 data[5] = r >> 16 & 0xff; in blf_ecb_encrypt()
566 data[6] = r >> 8 & 0xff; in blf_ecb_encrypt()
567 data[7] = r & 0xff; in blf_ecb_encrypt()
568 data += 8; in blf_ecb_encrypt()
573 blf_ecb_decrypt(blf_ctx *c, uint8_t *data, uint32_t len) in blf_ecb_decrypt() argument
579 l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3]; in blf_ecb_decrypt()
580 r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]; in blf_ecb_decrypt()
582 data[0] = l >> 24 & 0xff; in blf_ecb_decrypt()
583 data[1] = l >> 16 & 0xff; in blf_ecb_decrypt()
584 data[2] = l >> 8 & 0xff; in blf_ecb_decrypt()
585 data[3] = l & 0xff; in blf_ecb_decrypt()
586 data[4] = r >> 24 & 0xff; in blf_ecb_decrypt()
587 data[5] = r >> 16 & 0xff; in blf_ecb_decrypt()
588 data[6] = r >> 8 & 0xff; in blf_ecb_decrypt()
589 data[7] = r & 0xff; in blf_ecb_decrypt()
590 data += 8; in blf_ecb_decrypt()
595 blf_cbc_encrypt(blf_ctx *c, uint8_t *iv, uint8_t *data, uint32_t len) in blf_cbc_encrypt() argument
602 data[j] ^= iv[j]; in blf_cbc_encrypt()
603 l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3]; in blf_cbc_encrypt()
604 r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]; in blf_cbc_encrypt()
606 data[0] = l >> 24 & 0xff; in blf_cbc_encrypt()
607 data[1] = l >> 16 & 0xff; in blf_cbc_encrypt()
608 data[2] = l >> 8 & 0xff; in blf_cbc_encrypt()
609 data[3] = l & 0xff; in blf_cbc_encrypt()
610 data[4] = r >> 24 & 0xff; in blf_cbc_encrypt()
611 data[5] = r >> 16 & 0xff; in blf_cbc_encrypt()
612 data[6] = r >> 8 & 0xff; in blf_cbc_encrypt()
613 data[7] = r & 0xff; in blf_cbc_encrypt()
614 iv = data; in blf_cbc_encrypt()
615 data += 8; in blf_cbc_encrypt()
620 blf_cbc_decrypt(blf_ctx *c, uint8_t *iva, uint8_t *data, uint32_t len) in blf_cbc_decrypt() argument
626 iv = data + len - 16; in blf_cbc_decrypt()
627 data = data + len - 8; in blf_cbc_decrypt()
629 l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3]; in blf_cbc_decrypt()
630 r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]; in blf_cbc_decrypt()
632 data[0] = l >> 24 & 0xff; in blf_cbc_decrypt()
633 data[1] = l >> 16 & 0xff; in blf_cbc_decrypt()
634 data[2] = l >> 8 & 0xff; in blf_cbc_decrypt()
635 data[3] = l & 0xff; in blf_cbc_decrypt()
636 data[4] = r >> 24 & 0xff; in blf_cbc_decrypt()
637 data[5] = r >> 16 & 0xff; in blf_cbc_decrypt()
638 data[6] = r >> 8 & 0xff; in blf_cbc_decrypt()
639 data[7] = r & 0xff; in blf_cbc_decrypt()
641 data[j] ^= iv[j]; in blf_cbc_decrypt()
643 data -= 8; in blf_cbc_decrypt()
645 l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3]; in blf_cbc_decrypt()
646 r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]; in blf_cbc_decrypt()
648 data[0] = l >> 24 & 0xff; in blf_cbc_decrypt()
649 data[1] = l >> 16 & 0xff; in blf_cbc_decrypt()
650 data[2] = l >> 8 & 0xff; in blf_cbc_decrypt()
651 data[3] = l & 0xff; in blf_cbc_decrypt()
652 data[4] = r >> 24 & 0xff; in blf_cbc_decrypt()
653 data[5] = r >> 16 & 0xff; in blf_cbc_decrypt()
654 data[6] = r >> 8 & 0xff; in blf_cbc_decrypt()
655 data[7] = r & 0xff; in blf_cbc_decrypt()
657 data[j] ^= iva[j]; in blf_cbc_decrypt()
662 report(uint32_t data[], uint16_t len)
667 i / 2, data[i], data[i + 1]);
677 uint32_t data[10];
685 data[i] = i;
688 blf_enc(&c, data, 5);
689 blf_dec(&c, data, 1);
690 blf_dec(&c, data + 2, 4);
692 report(data, 10);