ROT13 algorithm in C
Test your program with a variety of inputs.
Include "abcdefghijklmnopqrstuvwxyz".

Have a look what happens for 'n'.
Always try to make sure you test low values, high values and edge cases.
'Wrapping round' is a classic edge case.

Then look at this line:

if ((currentLetter - 'a') + key &gt; 26)


This program only works for lower case 'passwords'.

You might look at the functions in #include &lt;ctype.h&gt; such as tolower(.) or islower(.) to extend to mixing upper and lower case.

NB Obviously ROT13 has no real cryptographic value of any kind.
I mention that because I have seen it (and things not better) used in applications.
You're doing this as a learning exercise. Right?