strRandomness
Score events according to their randomness based on the Shannon entropy of the string value of the specified column. Higher scores are given to more random strings. If a string contains no duplicate characters, it gets the highest score. Strings with duplicate characters get lower scores.
Usage Details
LQL Command
select *, strRandomness(column) as hashCode from tableName -- column: column name to compute randomness score -- tableName: name of a table -- returnValue: randomnes (Shannon) of a string, if string contains no duplicate characters, it will get hightest score otherwise the more duplicate characters the string have less score it will get
Example
Input
table
id | password |
---|---|
1 | axbyze@#fa23 |
2 | aaaaaa |
LQL command
select *, strRandomness(password) as passwordStrength from table
Output
id | password | passwordStrength |
---|---|---|
1 | axbyze@#fa23 | 6.0 |
2 | aaaaaa | 1.98 |