made a class for encrpyt/decrpyt

Single place to change encryption code is probably better.