encryption:encryption deals with key which are used to encrypt and decrypt the data. these keys are used to transfer a simple text into a cypher text and the vice versa. encryption maintains confidentiality.
hashing: in hashing the message is converted into a digest or hash, which is a number generated from a string of text. the digest are important as one can easily match the hash of sent and received message to ensure that both are the same and no tampering of data is done. hashing maintains integrity.