This example shows how to create a base64 encoding using a SHA1 hash value using a nonce (one-time value).
Concatenate the inputs and base64 encode the value of SHA1 hashing function
var password_hash = utils.base64(utils.fromHex(utils.sha1(nonce + timestamp + password)));
Additional Information:
Creating a Hash Password Using a One Time Value for a Virtual Script