Made Encryption better and tested the jpeg encryption