vSphere virtual machine encryption works with any supported storage type (NFS, iSCSI, Fibre Channel, direct-attached storage, and so on), including VMware vSAN.
For more information about using encryption on a vSAN cluster, see Administering VMware vSAN documentation. vSphere virtual machine encryption and vSAN use the same encryption libraries but they have different profiles.
VM encryption is virtual machine level encryption and vSAN is a datastore level encryption.