CryptoSys PKI Pro Manual

Sig.SignFile Method

Compute a signature value over binary data in a file.

Syntax

[C#]
public static string SignFile(
   string dataFile,
   string privateKeyFile,
   string password,
   SigAlgorithm sigAlg,
   Sig.SigOptions sigOpts = Sig.SigOptions.Default,
   Sig.Encoding sigEncoding = Sig.Encoding.Default 
)
[VB]
Public Shared Function SignFile (
   dataFile As String,
   privateKeyFile As String,
   password As String,
   sigAlg As SigAlgorithm,
   Optional sigOpts As Sig.SigOptions = Sig.SigOptions.Default,
   Optional sigEncoding As Sig.Encoding = Sig.Encoding.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  Sig.SigOptions  (Optional)
(optional) Options for ECDSA and RSA-PSS signatures
sigEncoding  Sig.Encoding  (Optional)
Optional encodings for output [default=base64]

Return Value

The encoded signature, or an empty string on error

See Also

VB6/C equivalent: SIG_SignFile

[Contents] [Index]

[PREV: Sig.SignDigest Method...]   [Contents]   [Index]   
   [NEXT: Sig.VerifyData Method...]

Copyright © 2004-26 D.I. Management Services Pty Ltd t/a CryptoSys. All rights reserved. Generated 2026-09-17T11:18:15Z.