finish encrypt doc