There are 2 types

Symmetrical encryption (private key):

Asymmetrical encryption (public key):