move cryptString and decryptString to library