public override void Execute() { if (Parameters.Count > 0) { FlowObjectResource flowObjectResource = _Client.GetResource("20000/0") as FlowObjectResource; if (flowObjectResource != null) { flowObjectResource.FCAP = Parameters[0]; flowObjectResource.Changed(); } } }
void FlowObject_Updated(object sender, EventArgs e) { FlowObjectResource flowObjectResource = sender as FlowObjectResource; if (flowObjectResource != null) { if ((flowObjectResource.TenantChallenge != null) && (flowObjectResource.HashIterations != null)) { string tenantSecret = "getATTtDsNBpBRnMsN7GoQ=="; HMACSHA256 hmac = new HMACSHA256(); hmac.Key = Convert.FromBase64String(tenantSecret); byte[] hash = hmac.ComputeHash(flowObjectResource.TenantChallenge); for (int index = 1; index < flowObjectResource.HashIterations.Value; index++) { hash = hmac.ComputeHash(hash); } flowObjectResource.TenantHash = hash; flowObjectResource.Changed(); } } }