pre & encrypt