Convertigo Public Knowledge base

Variables hash and visibility

In Convertigo, all variables have a ‘Visibility’ property, it is used to hide their value at different levels (logs, project YAML source file, etc).

If you want to hash your data before comparing it to your SQL data, for example, here is some Java/Javascript code you can use in a SequenceJS step:

var dgu = org.apache.commons.codec.digest.DigestUtils(); var token = dgu.sha256Hex(data);

data” is a sequence variable or a combination of a “user” variable and a “password” variable, for example, if these variables are already available in the sequence:

var data = user + '/' + password; var dgu = org.apache.commons.codec.digest.DigestUtils(); var token = dgu.sha256Hex(data);

Here is the Javadoc of sha256Hex method: https://commons.apache.org/proper/commons-codec/apidocs/org/apache/commons/codec/digest/DigestUtils.html#sha256Hex-java.lang.String-

sha256Hex method to hash variables

 

(c) Convertigo 2023 https://www.convertigo.com