Supreme Court Justice Ruth Bader Ginsburg speaks during the 2018 Sundance Film Festival on Jan. 21 in Park City, Utah. (Robin Marchant/Getty Images)

Long before she donned a black judge’s robe, before she led a decades-long legal fight for gender equality, Supreme Court Justice Ruth Bader Ginsburg was a young, studious college kid taking a chemistry class at Cornell University.

One day, as she was preparing for a test, she told her professor she felt uncomfortable with some of the material.

“He said, ‘I’ll give you a practice exam,’” Ginsburg recalled in an interview Sunday with NPR’s Nina Totenberg at the Sundance Film Festival in Park City, Utah.

When Ginsburg went to class the next day, she discovered that the professor had actually just slipped her an advance copy of the real test. “And I knew exactly what he wanted in return,” she said. “And that’s just one of many examples.”

Ginsburg recounted the story in a roughly 90-minute discussion with Totenberg that touched on the 84-year-old justice’s experiences with sexual misconduct and her reaction to the #MeToo movement, as well as her career as a women’s rights advocate and her future on the high court. She was in Utah for the premiere of “RBG,” a new documentary about her life that was co-produced by CNN.

When she was a college student in the 1950s, women had little recourse against unwanted sexual advances, Ginsburg told Totenberg, NPR’s legal affairs correspondent and a good friend, ahead of the screening.

“The attention to sexual harassment was simply, ‘Get past it. Boys will be boys,’” she said.

But even at the time, Ginsburg didn’t let the incident with the professor go: “I went to his office and I said, ‘How dare you? How dare you do this?’ And that was the end of that.”

As a protest, she added, she deliberately made two mistakes on the exam.

Before ascending to the Supreme Court in 1993, Ginsburg, a Columbia Law School grad, spent a significant chunk of her career fighting for equal pay and women’s rights as a lawyer. She co-founded the Women’s Rights Law Reporter, a pioneering law journal out of Rutgers School of Law, where she taught, as well as the American Civil Liberties Union’s Women’s Rights Project. In the mid-1970s, she argued a half-dozen gender discrimination cases before the high court, winning all but one.

Robert Redford, chairman of the Sundance Institute, introduced Ginsburg at Sunday’s talk, saying, “I think she’s going to enhance the quality of our festival just by being here.”

Notably absent at the Sundance festival this year was film mogul Harvey Weinstein, who was forced out of the Academy of Motion Picture Arts and Sciences and fired from his production company after sexual assault allegations against him from dozens of women surfaced late last year. The wave of misconduct claims turned the once-ubiquitous producer into the bete noire of Hollywood and prompted many women, and some men, to come forward with their own claims against powerful men in entertainment, media and  government.

When Totenberg asked Ginsburg for her thoughts on the #MeToo movement, the justice didn’t miss a beat.

“I think it’s about time,” she said. “For so long women were silent, thinking there was nothing you could do about it. But now the law is on the side of women or men who encounter harassment, and that’s a good thing.”

As more and more women have publicly accused high-profile men of harassment and assault, some have expressed concern about a potential backlash that could undermine the movement. Ginsburg said she’s not afraid.

“Let’s see where it goes. So far, it’s been great,” she said. “When I see women appearing every place in numbers I’m less worried about backlash than I might have been 20 years ago.”

Ginsburg appeared in good spirits throughout the conversation, especially when Totenberg asked her about her status as a cultural symbol and the growing cult of “the Notorious RBG,” as some supporters call her. An entire cottage industry has sprung up around the justice in recent years, complete with mugs, T-shirts, songs and even children’s books.

“Every liberal in America is prepared to throw their bodies in front of you to protect you,” Totenberg said. “How do colleagues feel?”

“My colleagues are judiciously silent about the notorious RBG,” the justice responded.

She’s seen Kate McKinnon’s Ruth Bader Ginsburg character on “Saturday Night Live,” she added, and she’s a fan.

“I would like to say ‘Ginsburned’ sometimes to my colleagues,” Ginsburg said to applause from the audience, mimicking McKinnon’s signature line. “I liked the actress who portrayed me.”

The conversation closed with a question about Ginsburg’s health, which she said was “very good.”

“As long as I can do the job full-steam,” she said, “I will be here.”

More from Morning Mix:

Analysis | Congress can easily avoid shutdowns. Here’s why it doesn’t.

The MoviePass deal: For less than $120 a year, you can see 365 movies. Here’s the catch.