BOOL IsAesHwCpuSupported () { static BOOL state = FALSE; static BOOL stateValid = FALSE; if (!stateValid) { state = is_aes_hw_cpu_supported() ? TRUE : FALSE; stateValid = TRUE; } return state && !HwEncryptionDisabled; }
bool CipherAES::IsHwSupportAvailable () const { #ifdef TC_AES_HW_CPU static bool state = false; static bool stateValid = false; if (!stateValid) { state = is_aes_hw_cpu_supported() ? true : false; stateValid = true; } return state && HwSupportEnabled; #else return false; #endif }