Script to hash a password before provision it to the target system database

Hi everyone,

I have a target system connected through the Native Database Connector and i have to provision the password on this database. In the target system database the password is encrypted using SHA256 hex but it is not automatically done by the database, so i need to hash the password with SHA256 hex before the provisioning. 

Is it possible to build a script which hash the password and call this script before the provisioning? can you provide me a code example for the script?

Thank you in advance!