6sense Interview Question

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