Skip to content

Commit b2d65b6

Browse files
committed
add man page for sha1_hex
[ci skip]
1 parent 536569a commit b2d65b6

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

man/man8/sha1_hex.8

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
.TH sha1_hex "8" "August 2017" "sha1_hex" "DB2 User Defined Function and Stored Procedure"
2+
.SH NAME
3+
sha1_hex \- DB2 UDF and SP to generate an SHA1 40-character hexadecimal hash
4+
.SH SYNOPSIS
5+
>>-SHA1_HEX--(--expression--)--------------------------------><
6+
.PP
7+
>>-SHA1_HEX--(--expression--,--hash--)-----------------------><
8+
.SH DESCRIPTION
9+
SHA1 algorithm. The sha1_hex routine returns a 40-character hexadecimal hash.
10+
.PP
11+
The argument can be a character string that is either a CHAR or VARCHAR not exceeding 4096 bytes.
12+
.PP
13+
The result of the function is CHAR(40). The result can be null; if the argument is null, the result is the null value.
14+
.SH EXAMPLES
15+
\fBExample 1:\fR
16+
17+
.br
18+
Inserting the user \fItest\fR and the sha1 crypted clear text \fItestpwd\fR to the table \fIusers\fR.
19+
.PP
20+
.nf
21+
INSERT INTO USERS (username, password)
22+
VALUES ('test', sha1_hex('testpwd'))
23+
.fi
24+
.PP
25+
\fBExample 2:\fR
26+
27+
.br
28+
.nf
29+
SELECT sha1_hex('testpwd') FROM SYSIBM.SYSDUMMY1
30+
31+
1
32+
----------------------------------------
33+
98ef0758e6aac6f9a9e1197548c8190b72c9581d
34+
35+
1 record(s) selected.
36+
.fi
37+
.PP
38+
\fBExample 3:\fR
39+
40+
.br
41+
.nf
42+
CALL sha1_hex('testpwd', ?)
43+
44+
Value of output parameters
45+
--------------------------
46+
Parameter Name : HASH
47+
Parameter Value : 98ef0758e6aac6f9a9e1197548c8190b72c9581d
48+
49+
Return Status = 0
50+
.fi
51+
.SH AUTHOR
52+
Written by Helmut K. C. Tessarek.
53+
.SH "BUGS"
54+
Hopefully none :-) But if you find one, please report it at:
55+
.br
56+
https://github.com/tessus/db2-hash-routines/issues
57+
.SH "WEB SITE"
58+
http://tessus.github.io/db2-hash-routines

0 commit comments

Comments
 (0)