Module

XuDsigU

Path

C:\CPRS\CPRS30\XuDigSig\XuDsigU.pas

Last Modified

7/15/2014 3:26:44 PM

Functions

Name Owner Declaration Scope Comments
CertDateTime - function CertDateTime(CertTime: FileTime): TdateTime; Interfaced
To convert to printable string use
 DateTimeToStr  or DateTimeToString
CertDateTimeStr - function CertDateTimeStr(CertTime: FileTime): string; Interfaced Returns a string from a Cert DateTime
SerialNum - function SerialNum(pbdata: pbytearray; len: DWORD): string; Interfaced
This helper function is to build a HEX string from
a pointer the the Serial number in a CERT_INFO


Module Source

1     unit XuDsigU;
2     
3     interface
4     
5     uses
6         Windows, SysUtils;
7     
8     
9     function SerialNum(pbdata: pbytearray; len: DWORD): string;
10    function CertDateTime(CertTime: FileTime): TdateTime;
11    function CertDateTimeStr(CertTime: FileTime): string;
12    
13    implementation
14    
15    //This helper function is to build a HEX string from
16    //a pointer the the Serial number in a CERT_INFO
17    function SerialNum(pbdata: pbytearray; len: DWORD): string;
18    var
19        i: integer;
20    begin
21        Result := '';    //Init return string
22        for i := len - 1 downto 0 do
23        begin
24            Result := Result + IntToHex(byte(pbdata[i]), 2);
25    
26        end;
27    end;  //SerialNum
28    
29    function CertDateTime(CertTime: FileTime): TdateTime;
30    var
31        sysDateTime: TSystemTime;
32        dDateTime: TdateTime;
33        //To convert to printable string use
34        // DateTimeToStr  or DateTimeToString
35    begin
36        FileTimeToSystemTime(CertTime, sysDateTime);
37        dDateTime := systemTimeToDateTime(sysDateTime);
38        Result := dDateTime;
39    end;
40    
41    //Returns a string from a Cert DateTime
42    function CertDateTimeStr(CertTime: FileTime): string;
43    var
44        sysDateTime: TSystemTime;
45        dDateTime: TdateTime;
46    begin
47        FileTimeToSystemTime(CertTime, sysDateTime);
48        dDateTime := systemTimeToDateTime(sysDateTime);
49        Result := DateTimeToStr(dDateTime);
50    end;
51    
52    
53    end.

Module Calls (2 levels)

-

Module Called-By (2 levels)


        XuDsigU
      XuDsigS┘ 
    uOrders┤   
     fFrame┤   
fOrdersSign┤   
    fReview┘