in python
In [18]: data = '{"CIDR": "192.168.0.0/16", "clientToken": "79fa97e3-
...: c48b-xxxx-9f46-6a13d8163678", "enableIpv6": false, "name": "
...: vpc-for-test-wowop1", "regionID": "bb9fdb42056f11eda1610242a
...: c110002"}'
In [19]: hashlib.sha256(data.encode('utf-8')).hexdigest()
Out[19]: '4267a781e823207f868dfa448b1f0a775cebe40b97ba207aa5b82bcebdf906ab'
and in k6 crypto
const bodyStr = JSON.stringify({"CIDR": "192.168.0.0/16", "clientToken": "79fa97e3-c48b-xxxx-9f46-6a13d8163678", "enableIpv6": false, "name": "vpc-for-test-wowop1", "regionID": "bb9fdb42056f11eda1610242ac110002"});
const hasher = crypto.createHash("sha256")
hasher.update(bodyStr)
const bodyDigest = hasher.digest("hex");
console.log(bodyDigest); // output d1eb42f56393693fa72ade6f8b65c1a533e345a3195529d2c8a8293745e61eb4
why they are different