|
@@ -35,13 +35,20 @@ type
|
|
|
// object identifiers for digests
|
|
// object identifiers for digests
|
|
|
//
|
|
//
|
|
|
DigestAlgorithm: String = '1.2.840.113549.2';
|
|
DigestAlgorithm: String = '1.2.840.113549.2';
|
|
|
|
|
+ //
|
|
|
|
|
+ // pkcs-3 OBJECT IDENTIFIER ::= {
|
|
|
|
|
+ // iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 3 }
|
|
|
|
|
+ //
|
|
|
|
|
+ Pkcs3: String = '1.2.840.113549.1.3';
|
|
|
|
|
|
|
|
class var
|
|
class var
|
|
|
|
|
|
|
|
FIsBooted: Boolean;
|
|
FIsBooted: Boolean;
|
|
|
- FMD2, FMD4, FMD5, FIdHmacWithSha1, FIdHmacWithSha224, FIdHmacWithSha256,
|
|
|
|
|
- FIdHmacWithSha384, FIdHmacWithSha512: IDerObjectIdentifier;
|
|
|
|
|
|
|
+ FDhKeyAgreement, FMD2, FMD4, FMD5, FIdHmacWithSha1, FIdHmacWithSha224,
|
|
|
|
|
+ FIdHmacWithSha256, FIdHmacWithSha384, FIdHmacWithSha512
|
|
|
|
|
+ : IDerObjectIdentifier;
|
|
|
|
|
|
|
|
|
|
+ class function GetDhKeyAgreement: IDerObjectIdentifier; static; inline;
|
|
|
class function GetMD2: IDerObjectIdentifier; static; inline;
|
|
class function GetMD2: IDerObjectIdentifier; static; inline;
|
|
|
class function GetMD4: IDerObjectIdentifier; static; inline;
|
|
class function GetMD4: IDerObjectIdentifier; static; inline;
|
|
|
class function GetMD5: IDerObjectIdentifier; static; inline;
|
|
class function GetMD5: IDerObjectIdentifier; static; inline;
|
|
@@ -56,6 +63,7 @@ type
|
|
|
|
|
|
|
|
public
|
|
public
|
|
|
|
|
|
|
|
|
|
+ class property DhKeyAgreement: IDerObjectIdentifier read GetDhKeyAgreement;
|
|
|
//
|
|
//
|
|
|
// md2 OBJECT IDENTIFIER ::=
|
|
// md2 OBJECT IDENTIFIER ::=
|
|
|
// {iso(1) member-body(2) US(840) rsadsi(113549) DigestAlgorithm(2) 2}
|
|
// {iso(1) member-body(2) US(840) rsadsi(113549) DigestAlgorithm(2) 2}
|
|
@@ -94,6 +102,7 @@ class procedure TPkcsObjectIdentifiers.Boot;
|
|
|
begin
|
|
begin
|
|
|
if not FIsBooted then
|
|
if not FIsBooted then
|
|
|
begin
|
|
begin
|
|
|
|
|
+ FDhKeyAgreement := TDerObjectIdentifier.Create(Pkcs3 + '.1');
|
|
|
FMD2 := TDerObjectIdentifier.Create(DigestAlgorithm + '.2');
|
|
FMD2 := TDerObjectIdentifier.Create(DigestAlgorithm + '.2');
|
|
|
FMD4 := TDerObjectIdentifier.Create(DigestAlgorithm + '.4');
|
|
FMD4 := TDerObjectIdentifier.Create(DigestAlgorithm + '.4');
|
|
|
FMD5 := TDerObjectIdentifier.Create(DigestAlgorithm + '.5');
|
|
FMD5 := TDerObjectIdentifier.Create(DigestAlgorithm + '.5');
|
|
@@ -107,6 +116,11 @@ begin
|
|
|
end;
|
|
end;
|
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
+class function TPkcsObjectIdentifiers.GetDhKeyAgreement: IDerObjectIdentifier;
|
|
|
|
|
+begin
|
|
|
|
|
+ result := FDhKeyAgreement;
|
|
|
|
|
+end;
|
|
|
|
|
+
|
|
|
class function TPkcsObjectIdentifiers.GetIdHmacWithSha1: IDerObjectIdentifier;
|
|
class function TPkcsObjectIdentifiers.GetIdHmacWithSha1: IDerObjectIdentifier;
|
|
|
begin
|
|
begin
|
|
|
result := FIdHmacWithSha1;
|
|
result := FIdHmacWithSha1;
|