Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel6
outlinefalse
typeflat
printablefalse

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.

...

Code Block
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

Code Block
select *, strRandomness(password) as passwordStrength from table

Output

id

password

passwordStrength

1

axbyze@#fa23

6.0

2

aaaaaa

1.98