CFB.encrypt
ubyte[] encrypt(const(ubyte)[] input)Encrypts data using CFB mode.
CFB encryption:
- Encrypt the shift register to produce output block
- XOR plaintext segment with MSB of output block
- Shift ciphertext into the shift register
A trailing partial segment shorter than the segment size is processed with the most significant bits of the output block and is not fed back (NIST SP 800-38A, Section 6.3).
Parameters
input | Plaintext to encrypt. The final segment may be a partial one of any non-zero byte length. |
Returns
Ciphertext of the same length as input.