In general, the answer to this question is yes. Nowadays, it’s universally agreed that a document cannot be denied legal enforceability solely because it is in electronic form. Electronic and digital signatures carry the same legal weight as paper documents with physical signatures.
However, there are certain rules and regulations depending on where in the world you are. Current NSW legislation, for example, only recognises digital and e-signatures if both parties to the contract have consented to the use of such signatures, and if the method used for signing is deemed entirely reliable.