Adding documentation to verifyPubKey function