Compute a signature value over binary data in a file.
Namespace: CryptoSysPKIAssembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.30549 (23.1.0.0)
Syntaxpublic static string SignFile(
string dataFile,
string privateKeyFile,
string password,
SigAlgorithm sigAlg,
SigSigOptions sigOpts = SigSigOptions.Default,
SigEncoding sigEncoding = SigEncoding.Default
)
Public Shared Function SignFile (
dataFile As String,
privateKeyFile As String,
password As String,
sigAlg As SigAlgorithm,
Optional sigOpts As SigSigOptions = SigSigOptions.Default,
Optional sigEncoding As SigEncoding = SigEncoding.Default
) As String
Parameters
- dataFile String
- Name of input file containing data to be signed
- privateKeyFile String
- Name of private key file
(or a string containing the key in PEM format, or an internal private key)
- password String
- Password for the private key, if encrypted
- sigAlg SigAlgorithm
- Signature algorithm to be used
- sigOpts SigSigOptions (Optional)
- (optional) Options for ECDSA and RSA-PSS signatures
- sigEncoding SigEncoding (Optional)
- Optional encodings for output [default=base64]
Return Value
StringThe encoded signature, or an empty string on error
See Also