[2.0.0] getTokenKey : add default value as in 1.3 and documentation

the current version of getTokenKey requires a length parameter but it was not the case in 1.3 and the rest of the function handles a null value as expected.