ESP key check: using my own max key length value