private void updateNetworkKeySecurity(final ProvisionedMeshNode node) {
        if (!node.isSecurelyProvisioned()) {
            for (NodeKey nodeKey : node.getAddedNetKeys()) {
                for(NetworkKey key : mMeshNetwork.netKeys) {
                    if(key.keyIndex == nodeKey.getIndex()) {
                        key.markAsInsecure();
                    }
                }
            }
        }
    }
Updates the minimum security property of a Network Key. If the node was provisioned
insecurely, all network keys added to the node are marked as insecure.

@param node Provisioned mesh node.
mesh/src/main/java/no/nordicsemi/android/mesh/MeshManagerApi.java