UniBasic Commands Reference - Rocket Software
UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software
SIGNATURE Syntax SIGNATURE(algorithm, action, data, dataLoc, key, keyLoc, keyFmt, pass, sigIn, result) Description The SIGNATURE() function generates a digital signature or verifies a signature using the supplied key. The algorithm parameter specifies the digest algorithm used to construct the signature. UniData supports the MD5 and SHA1 algorithms. There are four actions you can be specify: RSA-Sign, RSA-Verify, DSA-Sign, and DSA-Verify. If you choose DSA, you can only specify SHA1 in algorithm. The data to be signed or verified against a signature can be supplied either directly in data, or read from a file whose names is in data. For signing action, you should specify a private key. For verification, a public key is usually expected. However, UniData also accepts a private key for verification purposes. Key can be either in PEM or DER format. If a private key is password protected, the password must be supplied with pass. For verification, key can also contain a certificate or name of a certificate file. A signature is expected in sigIn. For signing action, the generated signature is put into result. 1-740 UniBasic Commands Reference
Parameters The following table describes each parameter of the syntax. Parameter Description algorithm The digest algorithm used for signing or verification (must be either “MD5” or “SHA1”). action 1 - RSA-Sign 2 - RSA-Verify 3 - DSA-Sign 4 - DSA-Verify data Data or the name of the file containing the data to be signed or verified. dataLoc 1 - Data in a string 2 - Data in a file key The key or the name of the file containing the key to be used to sign or verify. In the case of verification, key can be a certificate string or a file. keyLoc 1 - Key is in a string 2 - Key is in a file 3 - Key is in a certificate for verification keyFmt 1 - PEM 2 - DER pass A string containing the pass phrase for the private key. sigIn A string containing a digital signature. result A generated signature or a file to store the signature. SIGNATURE Parameters The following table describes the status of each return code. Return Code Status 0 Success. 1 Unsupported digest algorithm. 2 The data cannot be read. Return Code Status SIGNATURE 1-741
- Page 732 and 733: Examples In the following example,
- Page 734 and 735: Example In the following example, t
- Page 736 and 737: RNDSEED Syntax RNDSEED expr Descrip
- Page 738 and 739: SADD Syntax SADD(x, y) Description
- Page 740 and 741: The following table describes the s
- Page 742 and 743: Example In the following example, t
- Page 744 and 745: SELECT Syntax SELECT file.var [TO {
- Page 746 and 747: Examples The following program segm
- Page 748 and 749: SELECTINDEX Syntax SELECTINDEX inde
- Page 750 and 751: Related Commands UniBasic DELETELIS
- Page 752 and 753: Related Commands UniBasic DELETELIS
- Page 754 and 755: Note: SEND with the X option suppre
- Page 756 and 757: SEQS Syntax SEQS("char.expr") Descr
- Page 758 and 759: The following table describes the s
- Page 760 and 761: Parameters The following table desc
- Page 762 and 763: The following table describes the s
- Page 764 and 765: setHTTPDefault Syntax setHTTPDefaul
- Page 766 and 767: The following table describes the s
- Page 768 and 769: Parameters The following table desc
- Page 770 and 771: Examples In the following example,
- Page 772 and 773: setPrivateKey Syntax setPrivateKey(
- Page 774 and 775: setRandomSeed Syntax setRandomSeed(
- Page 776 and 777: setRequestHeader Syntax setRequestH
- Page 778 and 779: setSocketOptions Syntax setSocketOp
- Page 780 and 781: showSecurityContext Syntax showSecu
- Page 784 and 785: Return Code Status 1-742 UniBasic C
- Page 786 and 787: SLEEP Syntax SLEEP [hh:mm[:ss]] [se
- Page 788 and 789: SMUL Syntax SMUL(x, y) Description
- Page 790 and 791: Return Codes The return code indica
- Page 792 and 793: The following table describes each
- Page 794 and 795: SOAPGetDefault Syntax SOAPGetDefaul
- Page 796 and 797: SOAPGetFault Syntax SOAPGetFault(re
- Page 798 and 799: SOAPGetResponseHeader Syntax SOAPGe
- Page 800 and 801: SOAPRequestWrite Syntax SOAPRequest
- Page 802 and 803: SOAPSetDefault Syntax SOAPSetDefaul
- Page 804 and 805: Along with SOAPSetDefault, the Call
- Page 806 and 807: Return Codes The return code indica
- Page 808 and 809: Return Codes The return code indica
- Page 810 and 811: Return Codes The return code indica
- Page 812 and 813: You can also use the UniBasic STATU
- Page 814 and 815: Return Codes The return code indica
- Page 816 and 817: SOUNDEX Syntax SOUNDEX(expr) Descri
- Page 818 and 819: SPACE Syntax SPACE(expr) Descriptio
- Page 820 and 821: SPLICE Syntax SPLICE(expr1,"expr",
- Page 822 and 823: SQLAllocConnect Syntax status = SQL
- Page 824 and 825: SQLAllocEnv Syntax status = SQLAllo
- Page 826 and 827: SQLAllocStmt Syntax status = SQLAll
- Page 828 and 829: SQLBindCol Syntax status = SQLBindC
- Page 830 and 831: SQLBindParameter Syntax status = SQ
Parameters<br />
The following table describes each parameter of the syntax.<br />
Parameter Description<br />
algorithm The digest algorithm used for signing or verification (must be either<br />
“MD5” or “SHA1”).<br />
action 1 - RSA-Sign<br />
2 - RSA-Verify<br />
3 - DSA-Sign<br />
4 - DSA-Verify<br />
data Data or the name of the file containing the data to be signed or verified.<br />
dataLoc 1 - Data in a string<br />
2 - Data in a file<br />
key The key or the name of the file containing the key to be used to sign or<br />
verify. In the case of verification, key can be a certificate string or a file.<br />
keyLoc 1 - Key is in a string<br />
2 - Key is in a file<br />
3 - Key is in a certificate for verification<br />
keyFmt 1 - PEM<br />
2 - DER<br />
pass A string containing the pass phrase for the private key.<br />
sigIn A string containing a digital signature.<br />
result A generated signature or a file to store the signature.<br />
SIGNATURE Parameters<br />
The following table describes the status of each return code.<br />
Return<br />
Code Status<br />
0 Success.<br />
1 Unsupported digest algorithm.<br />
2 The data cannot be read.<br />
Return Code Status<br />
SIGNATURE 1-741