wpa_supplicant/hidl/sprd_1.2/sta_network.cpp
/**
 * Check if the provided psk passhrase is valid or not.
 *
 * Returns 0 if valid, 1 otherwise.
 */
Check if the provided psk passhrase is valid or not.
Returns 0 if valid, 1 otherwise.
Check if the provided psk passhrase is valid or not . Returns 0 if valid 1 otherwise .
int StaNetwork::isPskPassphraseValid(const std::string &psk)
{
	if (psk.size() <
		static_cast<uint32_t>(ISupplicantStaNetwork::ParamSizeLimits::
					  PSK_PASSPHRASE_MIN_LEN_IN_BYTES) ||
	    psk.size() >
		static_cast<uint32_t>(ISupplicantStaNetwork::ParamSizeLimits::
					  PSK_PASSPHRASE_MAX_LEN_IN_BYTES)) {
		return 1;
	}
	if (has_ctrl_char((u8 *)psk.c_str(), psk.size())) {
		return 1;
	}
	return 0;
}
int StaNetwork :: isPskPassphraseValid ( const std :: string & psk ) { if ( psk . size ( ) < static_cast < uint32_t > ( ISupplicantStaNetwork :: ParamSizeLimits :: PSK_PASSPHRASE_MIN_LEN_IN_BYTES ) || psk . size ( ) > static_cast < uint32_t > ( ISupplicantStaNetwork :: ParamSizeLimits :: PSK_PASSPHRASE_MAX_LEN_IN_BYTES ) ) { return 1 ; } if ( has_ctrl_char ( ( u8 * ) psk . c_str ( ) , psk . size ( ) ) ) { return 1 ; } return 0 ; }
Check if the provided psk passhrase is valid or not.
Check if the provided psk passhrase is valid or not .