gsupplicant: Creating an helper function to compute bss security