key sanitization