You seem confused about a few things. Bear with me, this is a very common confusion!
Encryption is defined with the intent of confidentially transporting information: if you encrypt information, it is meant to be hidden until decrypted by the receiving party. Note that in your pseudo code
hash = doHash(message)
signature = doAsymetricEncrypt(hash, ...