Java implementation of tiny encryption algorithm