Fixed encrpyt/decrpyt

created functions for encrpyt and decrpyt