dco_decode_security_flags method

  1. @protected
SecurityFlags dco_decode_security_flags(
  1. dynamic raw
)
override

Implementation

@protected
SecurityFlags dco_decode_security_flags(dynamic raw) {
  // Codec=Dco (DartCObject based), see doc to use other codecs
  final arr = raw as List<dynamic>;
  if (arr.length != 4)
    throw Exception('unexpected arr length: expect 4 but see ${arr.length}');
  return SecurityFlags(
    isVpnDetected: dco_decode_bool(arr[0]),
    isDnsSpoofed: dco_decode_bool(arr[1]),
    isProxyDetected: dco_decode_bool(arr[2]),
    interfaceName: dco_decode_String(arr[3]),
  );
}