Consent of Independent Registered Public Accounting Firm
We consent to the incorporation by reference in this Registration Statement (Form S-8) of Territorial Bancorp Inc. of our report dated March 15, 2017, relatingto the consolidated financial statements and the effectiveness of internal control over financial reporting of Territorial Bancorp Inc. which report appears in the Form 10-K of Territorial Bancorp Inc. for the year ended December 31, 2016.
/s/ Moss Adams LLP
Portland, Oregon
June 14, 2017