6sense interview question

What is difference between encryption, encoding, and hashing? Explain cross-site scripting attack?