Procházet zdrojové kódy

update PkcsObjectIdentifier

Ugochukwu Mmaduekwe před 6 roky
rodič
revize
325657c033

+ 17 - 2
CryptoLib/src/Asn1/Pkcs/ClpPkcsObjectIdentifiers.pas

@@ -41,14 +41,21 @@ type
     //
     Pkcs3: String = '1.2.840.113549.1.3';
 
+    //
+    // pkcs-5 OBJECT IDENTIFIER ::= {
+    // iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 5 }
+    //
+    Pkcs5: String = '1.2.840.113549.1.5';
+
   class var
 
     FIsBooted: Boolean;
-    FDhKeyAgreement, FMD2, FMD4, FMD5, FIdHmacWithSha1, FIdHmacWithSha224,
-      FIdHmacWithSha256, FIdHmacWithSha384, FIdHmacWithSha512
+    FDhKeyAgreement, FIdPbkdf2, FMD2, FMD4, FMD5, FIdHmacWithSha1,
+      FIdHmacWithSha224, FIdHmacWithSha256, FIdHmacWithSha384, FIdHmacWithSha512
       : IDerObjectIdentifier;
 
     class function GetDhKeyAgreement: IDerObjectIdentifier; static; inline;
+    class function GetIdPbkdf2: IDerObjectIdentifier; static; inline;
     class function GetMD2: IDerObjectIdentifier; static; inline;
     class function GetMD4: IDerObjectIdentifier; static; inline;
     class function GetMD5: IDerObjectIdentifier; static; inline;
@@ -64,6 +71,8 @@ type
   public
 
     class property DhKeyAgreement: IDerObjectIdentifier read GetDhKeyAgreement;
+
+    class property IdPbkdf2: IDerObjectIdentifier read GetIdPbkdf2;
     //
     // md2 OBJECT IDENTIFIER ::=
     // {iso(1) member-body(2) US(840) rsadsi(113549) DigestAlgorithm(2) 2}
@@ -103,6 +112,7 @@ begin
   if not FIsBooted then
   begin
     FDhKeyAgreement := TDerObjectIdentifier.Create(Pkcs3 + '.1');
+    FIdPbkdf2 := TDerObjectIdentifier.Create(Pkcs5 + '.12');
     FMD2 := TDerObjectIdentifier.Create(DigestAlgorithm + '.2');
     FMD4 := TDerObjectIdentifier.Create(DigestAlgorithm + '.4');
     FMD5 := TDerObjectIdentifier.Create(DigestAlgorithm + '.5');
@@ -146,6 +156,11 @@ begin
   result := FIdHmacWithSha512;
 end;
 
+class function TPkcsObjectIdentifiers.GetIdPbkdf2: IDerObjectIdentifier;
+begin
+  result := FIdPbkdf2;
+end;
+
 class function TPkcsObjectIdentifiers.GetMD2: IDerObjectIdentifier;
 begin
   result := FMD2;