Lines Matching refs:buffer
57 cipher_output(cipher_t *c, uint8_t *buffer, int num_octets_to_output) {
59 /* zeroize the buffer */
60 octet_string_set_to_zero(buffer, num_octets_to_output);
62 /* exor keystream into buffer */
63 return cipher_encrypt(c, buffer, (unsigned int *) &num_octets_to_output);
88 uint8_t buffer[SELF_TEST_BUF_OCTETS];
126 /* copy plaintext into test buffer */
132 buffer[i] = test_case->plaintext[i];
135 octet_string_hex_string(buffer,
147 status = cipher_encrypt(c, buffer, &len);
154 octet_string_hex_string(buffer,
162 if (buffer[i] != test_case->ciphertext[i]) {
171 octet_string_hex_string(buffer,
193 /* copy ciphertext into test buffer */
199 buffer[i] = test_case->ciphertext[i];
202 octet_string_hex_string(buffer,
214 status = cipher_decrypt(c, buffer, &len);
221 octet_string_hex_string(buffer,
229 if (buffer[i] != test_case->plaintext[i]) {
237 octet_string_hex_string(buffer,
279 status = rand_source_get_octet_string(buffer, length);
283 octet_string_hex_string(buffer, length));
285 /* copy plaintext into second buffer */
287 buffer2[i] = buffer[i];
313 /* encrypt buffer with cipher */
315 status = cipher_encrypt(c, buffer, &length);
321 octet_string_hex_string(buffer, length));
337 status = cipher_decrypt(c, buffer, &length);
344 octet_string_hex_string(buffer, length));
351 if (buffer[i] != buffer2[i]) {