Hi,
I have an encryption logic which is as below, which encrypts and alphabet to alphabet

The input is passed in this (----) place

select chr(mod(ascii(----) - ascii('a') + 541 , ascii('z') - ascii('a')) + ascii('a')) from dual

541 is a seed value based on userid which changes for different logins.

With this (a) and (z) are encrypted to the same value, and hence i am facing problems in decrypting.

can somebody help in changing the above encrption logic.