This is a security question, What if I give to the user:
- a sample input before encrypting
- a sample output after encrypting
- the encryption method
but I did not provide the correct key for the encryption method, would it be easily that the user can find the encryption key?
Thanks in advance.
Not easy, no. It does make cracking the encyption easier though. You have confirmed the exact logic for producing the encrypted string, and given the attacker an example to test with.