Lines Matching refs:i
59 for (size_t i = 0; i < CODEWORD_BITS; i++) { in EncodeKey() local
62 word |= read_bit(input, i + j * CODEWORD_BITS) << j; in EncodeKey()
64 wordmatrix[i] = word; in EncodeKey()
69 for (size_t i = 0; i < ENCODE_LENGTH; i++) { in EncodeKey() local
71 if (i & (1 << b)) { in EncodeKey()
82 for (size_t i = OUTPUT_SIZE_BYTES - 1; i > 0; i--) { in EncodeKey() local
83 auto j = rng_state % (i + 1); in EncodeKey()
84 auto t = result[i]; in EncodeKey()
85 result[i] = result[j]; in EncodeKey()
98 for (size_t i = 0; i < len; i++) { in CondCopy() local
99 const uint32_t d = cdest[i]; in CondCopy()
100 const uint32_t s = csrc[i]; in CondCopy()
101 cdest[i] = d ^ (-ctl & (s ^ d)); in CondCopy()
124 for (uint32_t i = 0; i < ENCODE_LENGTH; i++) { in DecodeWord() local
125 scores.push_back(1 - 2 * read_bit(encoded, i * KEY_CODEWORDS + word)); in DecodeWord()
133 for (uint32_t i = 0; i < CODE_K; i++) { in DecodeWord() local
134 uint16_t step = 1u << i; in DecodeWord()
148 for (size_t i = 0; i < ENCODE_LENGTH; i++) { in DecodeWord() local
149 CopyWinner(&best, CodewordWinner{static_cast<uint16_t>(i), scores[i]}); in DecodeWord()
150 CopyWinner(&best, CodewordWinner{static_cast<uint16_t>(i | (1 << CODE_K)), -scores[i]}); in DecodeWord()
161 for (size_t i = 1; i < OUTPUT_SIZE_BYTES; i++) { in DecodeKey() local
162 auto j = rng_state % (i + 1); in DecodeKey()
163 encoded[i] = encoded[j]; in DecodeKey()
164 encoded[j] = shuffled[i]; in DecodeKey()
169 for (size_t i = 0; i < KEY_CODEWORDS; i++) { in DecodeKey() local
170 uint16_t val = DecodeWord(i, encoded); in DecodeKey()
171 result[i * CODEWORD_BYTES] = val & 0xffu; in DecodeKey()
172 result[i * CODEWORD_BYTES + 1] = val >> 8u; in DecodeKey()