User Tools

Site Tools


syntax:functions:hash

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
syntax:functions:hash [2015/08/25 02:41] – dmitrysyntax:functions:hash [2021/09/14 00:49] (current) – craigt
Line 1: Line 1:
-===== Hash(value) =====+====== Hash(value) ====== 
 +Category:  Special function
  
-Calculates 128-bit hash in Base64 encoding. The function returns the same result for the same value on any computer. It can't be used for creating primary/foreign keys as it allows [[https://en.wikipedia.org/wiki/Collision_%28computer_science%29|hash collisions]].+\\  
 +=====Description===== 
 +This function calculates a 128-bit hash in Base64 encoding. The function returns the same result for the same value on any computer.
  
-^  Example  ^  Result  ^ +\\  
-|  0| 1hipffIbvUu2HHnN7KlltA | +=====Arguments===== 
-|  TRUE  | nn8s3lvGRHcA0N3/R6NGQw | +^Argument^Type^Description^ 
-| 'TRUE'  | vSAg6sjmONe8VqjFASGqXw |+|value|Any|The source value used to generate the hash value. | 
 + 
 +**Return value type:** Text 
 + 
 +\\  
 +=====Remarks===== 
 +This can't be used for creating primary/foreign keys as it allows [[https://en.wikipedia.org/wiki/Hash_collision|hash collisions]]. 
 + 
 +\\  
 +=====Examples===== 
 + 
 +  hash(0)  //Returns '1hipffIbvUu2HHnN7KlltA' 
 + 
 +  hash(TRUE)  //Returns 'nn8s3lvGRHcA0N3/R6NGQw'  (Note, this is boolean TRUE.) 
 + 
 +  hash('TRUE')  //Returns 'vSAg6sjmONe8VqjFASGqXw'  (Note, this is text TRUE.)
  
syntax/functions/hash.1440470468.txt.gz · Last modified: by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki