I am looking for a method to encrypt a secret with a numeric PIN in such a way that if an attacker tries to decrypt with the wrong PIN, the ouput should be different.

For example, if the secret is ABCDE and the PIN is 5533, and the attacker tries to decrypt it with the incorrect PIN 1234, the output should be BASDAFF (a random string that looks like the secret).

I want to use this method to encode Diffie Hellman private key with PIN, so that a secret will be generated even if the PIN is wrong.