added sync encrypt