EXHIBIT 23.1
Consent of Independent Registered Public Accounting Firm
We consent to the incorporation by reference in the Registration Statement (No. 333-168839) on Form S-8 of Territorial Savings Bank of our report dated June 29, 2023, relating to the statements of net assets available for benefits of Territorial Savings Bank 401(k) Plan as of December 31, 2022 and 2021, the related statements of changes in net assets available for benefits for the years then ended and the related supplemental information as of December 31, 2022, appearing in this Annual Report on Form 11-K of Territorial Savings Bank 401(k) Plan for the year ended December 31, 2022.
/s/ Moss Adams LLP
Portland, Oregon
June 29, 2023