Salvation is the impartation of a new nature in a person's life. You can tell a Christian by the way he or she lives. His desires are now entirely different from before he came to know Christ. Her focus is to live honoring and glorifying God.
Whereas Psalm 25 is a plea for God's forgiveness because of one's sins, Psalm 26 is a prayer of a person who has been totally forgiven by God. It is a prayer brimming with confidence not in one's ability to be good, but in God's ability to forgive.
"Vindicate me, Lord," David implores of God, "for I have led a blameless life; I have trusted in the Lord and have not faltered." Some may say that it is rather condescending to pray a prayer like that for after all no one is entirely blameless. But then David expresses that it is through God's love and His faithfulness that give him such confidence: "for I have always been mindful of your unfailing love and have lived in reliance on your faithfulness."
Our basis in claiming righteousness does not rest on our ability to achieve it but rather on God's ability to impart it through faith in Christ's finished work on the cross.
Far from being perfect but when we are living in Christ and His life is flowing through us there is now a feeling of disinclination toward anything that is ungodly. Notice David's change of character: "I do not sit with the deceitful, nor do I associate with hypocrites. I abhor the assembly of evildoers and refuse to sit with the wicked."
After David has experienced God's deliverance, now his heart is tuned to worship, "I wash my hands in innocence, and go about your altar, Lord, proclaiming aloud your praise and telling of all your wonderful deeds. Lord, I love the house where you live, the place where your glory dwells."
Psalm 26 teaches us what a truly converted person to the Lord is like. First, there is confidence in the forgiveness of sin that God grants. Second, there is a distinct aversion to wickedness. And third, a truly converted person is someone who is drawn to worship Him.
Wait there is a fourth one, the last verse gives us another one, "My feet stand on level ground; in the great congregation I will praise the Lord." A truly converted person has a desire to witness for the Lord publicly in "the great congregation." How can we not witness if we have received the greatest gift of all. There is within the heart of a truly converted person an irresistible force to share what he has found.