modified decrypt api