Shark Tank star Mark Cuban is taking on the government once again.

In a blog post on Monday, the Dallas Mavericks owner said that Apple "must win" their current case against the FBI, in which a U.S. magistrate ordered Apple to help the FBI unlock the iPhone of one of the San Bernardino shooters. Apple is currently fighting the order. 

Cuban doesn't think that Apple should be immune from government requests to access data from the devices of suspected terrorists. But he's worried about how defense attorneys could act "if the precedent for Apple was set." 

Cuban told Inc. that he felt prompted to give his opinion on the case because he had not heard anyone comment on the implications of such a precedent.

His fear: In the San Bernardino case, Apple doesn't have to worry about being sued by the owner of the iPhone, Syed Rizwan Farook, because he is dead. But if Apple loses its appeal, the company could be forced to unlock the devices of suspects of other crimes. Defense attorneys could then claim that any evidence found on the device was "falsely planted" by Apple. 

Cuban wrote in his blog post: "The defendant's lawyer is going to scream as loud as they can that whatever was found was not originated by their client, that Apple, in cahoots with the government agency, modified their software to not only unlock the phone, but to also write to the device everything the government agency needs to gain a conviction."

He added that Apple would have to defend itself by making the code the company used to "open" devices public. The problem being that hackers could easily find this code, and hack into devices for their own (possibly illegal) purposes.

To avoid this, Cuban says that lawmakers need to pass a law "that limits the scope of what Apple must respond to." Here's the law Cuban suggests:

A company can be compelled to remove any type of security or encryption from a smartphone or tablet,  and only a smartphone or tablet, under only the following circumstances:

1. There has been an event, with casualties, that has been declared an Act of Terrorism.

2. There is reason to believe the smartphone was possessed by a participant in the Act of Terrorism.

3. The smartphone was on the premise during the event.

4. The  terrorist who was in possession of the smartphone or tablet is deceased.

This solution is different from what other tech executives have suggested. As Tim Cook stated in an  open letter, there is no Apple software that can currently create a "backdoor" to bypass  the iPhone's "erase data" feature, in which all the data on the iPhone is erased after 10 failed passcode attempts in a row (which is what the FBI is requesting in this case). The company is afraid that if it even creates the code, hackers could get a hold of it. Cuban's solution would force them to create that code. 

Cuban also used his blog post to take a dig at Bernie Sanders, Marco Rubio, and Ted Cruz for failing to address Apple's case in Congress. "We have three Senators running for president, and not one has moved a fingernail to even begin to deal with this issue let alone find a solution. That is sad in and of itself."

Editor's note: This post has been updated with a comment from Cuban.