No salary is retained in the deal, as it appears to be a cap-clearing move for the Penguins ahead of free agency, which begins July 1. The trade was first reported by TSN.
Sheary, a winger, is under contract through 2019-20 with a cap hit of $3 million. The 26-year-old signed with the Penguins as an undrafted free agent in 2015. He had a breakout season in 2016-17, scoring 23 goals and 30 assists in 61 games, but struggled last season with 18 goals and 12 assists in 79 games -- and only two assists in 12 playoff games.
Hunwick, a defenseman, is also under contract for the next two seasons. His cap hit is $2.25 million. The 33-year-old played in only 42 games for Pittsburgh last season, averaging 17:31 a night. Hunwick did not appear in any playoff games for the Penguins.
The Penguins on Wednesday evening used some of their newfound cap space to re-sign forward Riley Sheahan to a $2.1 million, one-year contract.
After winning back-to-back Stanley Cups, the Penguins were eliminated in the second round this postseason by the eventual champions, the Washington Capitals.
The Sabres have missed the playoffs for seven straight seasons but are looking to the future after selecting defenseman Rasmus Dahlin with the No. 1 overall pick in last week's NHL draft.
Buffalo GM Jason Botterill has been on the job since April 2017. Before that, he was an assistant general manager in Pittsburgh.
"We were looking to improve our even strength scoring," Botterill said, according to the team's Twitter feed. "What I like about his game is he has played in playoff situations and has two Stanley Cups. He can come in and play with one of our offensive center men and finish off chances from them."
The Penguins now have $10,282,500 in projected cap space ahead of free agency. They are in the market for a defenseman.