P_SHA1 algorithm implemetation as defined in TLS spec for Node.js.
This mechanism is used in WS-Trust spec when calling services that require Server and Client entropy. In these scenarios both keys must be combined to make a shared secret using the PSHA1 algorithm to obtain the computed key.
$ npm install sha1
keysize is optional with default value 256.
var psha1 = ;var key = ;