Edited Encryption Function