I'm studying for the Security+ exam with the help of Total Seminars' Udemy course and in one video they claim that a digital signature is generated by encrypting a message with the sender's private key and then hashing the result. The digital signature is then verified by encrypting the webpage with the sender's public key, hashing the result and then "comparing" with the other hash.
Not only is this explanation rather vague on the final steps of verification but I think it's straight up wrong. Doing some independent research I find this page that says "Digital signatures do this by generating a unique hash of the message or document and encrypting it using the sender’s private key."
This claims that the process happens the opposite way and it makes way more sense. However in the comment section of this particular video is a course moderator arguing with many commenters saying that the presenter hasn't gotten it wrong and that it "just works".
Can someone please settle this debate?