Added exception to key length check for getSecretKey for HMAC as this type does not care about key length.