Closed bdwilton closed 3 years ago
Hello, I was just testing the Cipher_FMX program.
I set the Input format to TFormat_Copy and output to TFormat_Hex
Setup the rest and put 'Hello' into the plain text and press Encrypt. Then press Decrypt and its not correct.
Could be my logic or thinking of course.
In the procedure TFormMain.ButtonDecryptClick(Sender: TObject);
I swapped the following which gets it working.
OutputBuffer := (Cipher as TDECFormattedCipher).DecodeBytes(OutputFormatting.Decode(InputBuffer));
EditPlainText.Text := string(DECUtil.BytesToRawString(InputFormatting.Encode(OutputBuffer)));
// OutputBuffer := (Cipher as TDECFormattedCipher).DecodeBytes(InputFormatting.Decode(InputBuffer)); // // EditPlainText.Text := string(DECUtil.BytesToRawString(OutputFormatting.Encode(OutputBuffer)));
Fixed in developer branch, thanks for providing this fix!
Hello, I was just testing the Cipher_FMX program.
I set the Input format to TFormat_Copy and output to TFormat_Hex
Setup the rest and put 'Hello' into the plain text and press Encrypt. Then press Decrypt and its not correct.
Could be my logic or thinking of course.
In the procedure TFormMain.ButtonDecryptClick(Sender: TObject);
I swapped the following which gets it working.
OutputBuffer := (Cipher as TDECFormattedCipher).DecodeBytes(OutputFormatting.Decode(InputBuffer));
EditPlainText.Text := string(DECUtil.BytesToRawString(InputFormatting.Encode(OutputBuffer)));
// OutputBuffer := (Cipher as TDECFormattedCipher).DecodeBytes(InputFormatting.Decode(InputBuffer)); // // EditPlainText.Text := string(DECUtil.BytesToRawString(OutputFormatting.Encode(OutputBuffer)));