some crypto related middlewares for connect