UniBasic Commands Reference - Rocket Software
UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software
DIGEST Syntax DIGEST(algorithm, data, dataLoc, result) Description The DIGEST function generates a message digest of supplied data. A message digest is the result of a one-way hash function (digest algorithm) performed on the message. Message digest has the unique properties that alight change in the input results in a significant difference in the resulting digest. Therefore, the probability of two different messages resulting in the same digest (collision) is very unlikely. It is also virtually impossible to reverse to the original message from a digest. Message digest is widely used for digital signatures and other purposes. The desired digest algorithm is specified in algorithm. You specify data and its location are with data and dataLoc, respectively. UniData puts the arrived digest into a dynamic array in result. Since digest is short and has a fixed length, it is always put into a string, and no file option is provided. The result can be in either binary or hex format. 1-213 UniBasic Commands Reference
Parameters The following table describes each parameter of the syntax. Parameter Description algorithm A string containing the digest algorithm name (uppercase or lowercase). UniData supports the following algorithms: “md2” “md4” “md5” “mdc2” “rmd160” “sha” “sha1” data Data or the name of the file containing the data to be digested. dataLoc 1 - Data in a string 2 - Data in a file result A string to store the digest result. DIGEST Parameters The following table describes the status of each return code. Return Code Status 0 Success 1 Unsupported digest algorithm 2 The data file cannot be read 3 Message digest cannot be obtained 4 Invalid parameters Return Code Status DIGEST 1-214
- Page 162 and 163: Related Command UniBasic EXIT 1-165
- Page 164 and 165: In the next example, the program se
- Page 166 and 167: In the next example, the program se
- Page 168 and 169: COUNT Syntax COUNT(str.expr1, str.e
- Page 170 and 171: COUNTS Syntax COUNTS(expr,str.expr)
- Page 172 and 173: createCertificate Syntax createCert
- Page 174 and 175: createCertRequest Syntax createCert
- Page 176 and 177: Parameter Description The following
- Page 178 and 179: The following table describes the a
- Page 180 and 181: createSecureRequest Syntax createSe
- Page 182 and 183: Method Description The following ta
- Page 184 and 185: Parameters The following table desc
- Page 186 and 187: DATA Syntax DATA expr1 [,expr2]...
- Page 188 and 189: DBTOXML Syntax DBTOXML(xml_document
- Page 190 and 191: DCOUNT Syntax DCOUNT(str,delim) Des
- Page 192 and 193: DEACTIVATEKEY Syntax DEACTIVATEKEY
- Page 194 and 195: STATUS Code Example The following e
- Page 196 and 197: DEFFUN Syntax DEFFUN function.name
- Page 198 and 199: The preceding program calls the fol
- Page 200 and 201: Examples The following program segm
- Page 202 and 203: Examples The following program stat
- Page 204 and 205: In the next example, the program st
- Page 206 and 207: UniData SQL SELECT - For informatio
- Page 208 and 209: Examples In the following example,
- Page 210 and 211: Parameters The following table desc
- Page 214 and 215: DIR Syntax DIR(file.expr) Descripti
- Page 216 and 217: STATUS Codes DISABLEDEC has the fol
- Page 218 and 219: DISPLAYWIDTH Syntax DISPLAYWIDTH (s
- Page 220 and 221: DQUOTE DQUOTE is a synonym for the
- Page 222 and 223: Related Commands UniBasic PRECISION
- Page 224 and 225: ECHO Syntax ECHO [ON | OFF | expr]
- Page 226 and 227: EDADRV_CloseStmt Syntax RETCODE EDA
- Page 228 and 229: EDADRV_Connect Syntax RETCODE EDADR
- Page 230 and 231: EDADRV_Disconnect Syntax RETCODE ED
- Page 232 and 233: 1-226 UniBasic Commands Reference
- Page 234 and 235: Return Codes The following table de
- Page 236 and 237: Output Variable The following table
- Page 238 and 239: Output Variables The following tabl
- Page 240 and 241: EDADRV_GetDBInfo Syntax RETCODE EDA
- Page 242 and 243: EDADRV_GetEDAAttr Syntax RETCODE ED
- Page 244 and 245: EDADRV_GetErrmsg Syntax RETCODE EDA
- Page 246 and 247: Input Variables The following table
- Page 248 and 249: EDADRV_LoadSymbols Syntax RETCODE E
- Page 250 and 251: Output Variables The following tabl
- Page 252 and 253: Return Codes The following table de
- Page 254 and 255: Input Variables The following table
- Page 256 and 257: STATUS Codes ENABLEDEC has the foll
- Page 258 and 259: Parameter Description dataLoc 1 - D
- Page 260 and 261: Parameters he following table descr
DIGEST<br />
Syntax<br />
DIGEST(algorithm, data, dataLoc, result)<br />
Description<br />
The DIGEST function generates a message digest of supplied data. A message digest<br />
is the result of a one-way hash function (digest algorithm) performed on the message.<br />
Message digest has the unique properties that alight change in the input results in a<br />
significant difference in the resulting digest. Therefore, the probability of two<br />
different messages resulting in the same digest (collision) is very unlikely. It is also<br />
virtually impossible to reverse to the original message from a digest. Message digest<br />
is widely used for digital signatures and other purposes.<br />
The desired digest algorithm is specified in algorithm. You specify data and its<br />
location are with data and dataLoc, respectively. UniData puts the arrived digest into<br />
a dynamic array in result. Since digest is short and has a fixed length, it is always put<br />
into a string, and no file option is provided. The result can be in either binary or hex<br />
format.<br />
1-213 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong>