Almost 40 percent of Americans would give up sex for a year to never have to worry about being hacked, according to one new study.

The results also showed that 41 percent of Americans would rather give up their favorite food for a month than go through the password reset process for all their online accounts — a process that is recommended as routine for all online account holders in order to help prevent hacks.

A Daily Threat

Emmanuel Schalit, CEO of online password management firm Dashlane, which commissioned the survey of 2,000 U.S adults, said that the company used the “quirky angles” of food and sex to show just how top of mind cybersecurity is for Americans today.

“Cybersecurity is clearly a very real concern for a large portion of the population,” said Schalit. “A vast proportion of people understand the threat of hacking in daily life, and would sacrifice something fundamental to avoid it.”

Adam Wingler, an IT and security content creator for Cybrary, said he wasn’t at all surprised by the survey’s findings.

“A cyber attack on our PII (personally identifiable information), or our social media is extremely invasive, [and] a cyber attack could possibly wipe our finances and do much harm to our reputation.”

Millennials Share More

The study found that 43 percent of millennials would trade in sex for online safety; while 64 percent of those aged 18-34 showed themselves to be “more trusting,” said Schalit, saying they’ve shared or received passwords to other people’s accounts; 37 percent of those 35 and older said they’d shared passwords.

“The youngest people in our sample tend to be more trusting than older people for all sorts of reasons,” said Schalit. “In part that has to do with having a different attitude toward life [as a result] of both being younger and having been born in an age when the internet already existed.”

While the study shows that millennials are more inclined to share passwords, Schalit asserts that this doesn’t necessarily mean they’re doing so blindly or irresponsibly.

Related: Hacked in Space: Are Satellites the Next Cybersecurity Battleground?

“It's not a bad thing to share a password within a family or a company that has a [shared] Facebook account,” said Schalit. “The real problem is how you share it. If you share it over email that's a bad idea because email is always the first thing to get hacked.”

It’s ironic that the majority of millennials are more confident about their online security than older generations, and yet at the same time, evidently nervous about being hacked, with the aforementioned 43 percent of millennials saying they’d choose abstinence in exchange for online peace of mind.

How can one be both confident and wary at the same time? Because of just how serious the issue of cyber security has become. More than ever, Americans are seeng just how devastating hacks can be.

Hacks Make The News

“Hacking can have historical consequences as we’ve seen with the role of Wikileaks,” said Schalit. “Look at what happened with John Podesta.”

The hacking of Podesta, the former head of Hillary Clinton's presidential campaign, all came down to his password (he obeyed a ‘phishy’ email requesting him to reset his Gmail password). It was one of the most technically easy hacks around, but it worked.

Then, just last month, a widespread cyber attack shut down a number of popular websites including Twitter, Spotify, and Grubhub.

This attack was “only a trial,” Schalit speculated, and suspects that as we move deeper into the era of the Internet of Things, future attacks could be far more catastrophic.

“We could sit here and say it's rough right now, and that things will get better, and I wish it were true,” said Schalit. “But by 2020 we will [each] have between 20 and 30 devices connected to the internet. Of them most will be really cheap: a connected microwave, a connected baby bottle. People just won't spend time managing the security around [each device]. We’re becoming more vulnerable, and unless you take precautions, you're completely exposed.”

How To Prevent A Hack

So, how to prevent a hack? There’s no sure way, but for starters, you need to start caring enough to do something.

“The sad thing is not many Americans seem to want to take the necessary steps to protect our presence online,” said Wingler.

One first step you can take is to break your bad password habits.

Related: Follow These Tips to Avoid Getting Hacked

Dashlane’s survey found that in their passwords, 31 percent of Americans have used a pet’s name, 23 percent have used number sequences, 22 percent have used a family member’s name, and 21 percent have used a birthday. Get more creative, and also, mix it up.

“A lot of people use the same password for all of their multiple logins,” said Wingler. “Even if they are switching the passwords they are using very, very simple codes. I recommend a 16-character minimum with uppercase, lowercase, numbers, and symbols. Also if you can possibly encrypt any bit of information you own, by all means do it. It's better to be safe than sorry."