@@ -371,8 +371,8 @@ TCrypto = class sealed(TObject)
371371 class function CreateHaval_4_256 (): IHash; static;
372372 class function CreateHaval_5_256 (): IHash; static;
373373
374- class function CreateGost (ASBoxType: TGostSBox = TGostSBox.gsbTestParamSet)
375- : IHash; static;
374+ class function CreateGost (
375+ ASBoxType: TGost.TSBoxType = TGost.TSBoxType.TestParamSet) : IHash; static;
376376 class function CreateGost_CryptoProParamSet (): IHash; static;
377377
378378 // Streebog 256
@@ -878,14 +878,14 @@ class function THashFactory.THash128.CreateXXHash128: IHashWithKey;
878878
879879{ THashFactory.TCrypto }
880880
881- class function THashFactory.TCrypto .CreateGost(ASBoxType: TGostSBox ): IHash;
881+ class function THashFactory.TCrypto .CreateGost(ASBoxType: TGost.TSBoxType ): IHash;
882882begin
883883 Result := TGost.Create(ASBoxType);
884884end ;
885885
886886class function THashFactory.TCrypto .CreateGost_CryptoProParamSet: IHash;
887887begin
888- Result := TGost.Create(TGostSBox.gsbCryptoProParamSet );
888+ Result := TGost.Create(TGost.TSBoxType.CryptoProParamSet );
889889end ;
890890
891891class function THashFactory.TCrypto .CreateGOST3411_2012_256: IHash;
@@ -917,49 +917,49 @@ class function THashFactory.TCrypto.CreateHaval(ARounds: THashRounds;
917917 AHashSize: THashSize): IHash;
918918begin
919919 case ARounds of
920- THashRounds.hrRounds3 :
920+ THashRounds.Rounds3 :
921921 case AHashSize of
922- THashSize.hsHashSize128 :
922+ THashSize.Size128 :
923923 Result := CreateHaval_3_128();
924- THashSize.hsHashSize160 :
924+ THashSize.Size160 :
925925 Result := CreateHaval_3_160();
926- THashSize.hsHashSize192 :
926+ THashSize.Size192 :
927927 Result := CreateHaval_3_192();
928- THashSize.hsHashSize224 :
928+ THashSize.Size224 :
929929 Result := CreateHaval_3_224();
930- THashSize.hsHashSize256 :
930+ THashSize.Size256 :
931931 Result := CreateHaval_3_256();
932932 else
933933 raise EArgumentHashLibException.CreateRes(@SInvalidHavalHashSize);
934934 end ;
935935
936- THashRounds.hrRounds4 :
936+ THashRounds.Rounds4 :
937937 case AHashSize of
938- THashSize.hsHashSize128 :
938+ THashSize.Size128 :
939939 Result := CreateHaval_4_128();
940- THashSize.hsHashSize160 :
940+ THashSize.Size160 :
941941 Result := CreateHaval_4_160();
942- THashSize.hsHashSize192 :
942+ THashSize.Size192 :
943943 Result := CreateHaval_4_192();
944- THashSize.hsHashSize224 :
944+ THashSize.Size224 :
945945 Result := CreateHaval_4_224();
946- THashSize.hsHashSize256 :
946+ THashSize.Size256 :
947947 Result := CreateHaval_4_256();
948948 else
949949 raise EArgumentHashLibException.CreateRes(@SInvalidHavalHashSize);
950950 end ;
951951
952- THashRounds.hrRounds5 :
952+ THashRounds.Rounds5 :
953953 case AHashSize of
954- THashSize.hsHashSize128 :
954+ THashSize.Size128 :
955955 Result := CreateHaval_5_128();
956- THashSize.hsHashSize160 :
956+ THashSize.Size160 :
957957 Result := CreateHaval_5_160();
958- THashSize.hsHashSize192 :
958+ THashSize.Size192 :
959959 Result := CreateHaval_5_192();
960- THashSize.hsHashSize224 :
960+ THashSize.Size224 :
961961 Result := CreateHaval_5_224();
962- THashSize.hsHashSize256 :
962+ THashSize.Size256 :
963963 Result := CreateHaval_5_256();
964964 else
965965 raise EArgumentHashLibException.CreateRes(@SInvalidHavalHashSize);
@@ -1201,25 +1201,25 @@ class function THashFactory.TCrypto.CreateBlake2B(const AConfig: IBlake2BConfig;
12011201class function THashFactory.TCrypto .CreateBlake2B_160: IHash;
12021202begin
12031203 Result := THashFactory.TCrypto.CreateBlake2B
1204- (TBlake2BConfig.Create(THashSize.hsHashSize160 ) as IBlake2BConfig);
1204+ (TBlake2BConfig.Create(THashSize.Size160 ) as IBlake2BConfig);
12051205end ;
12061206
12071207class function THashFactory.TCrypto .CreateBlake2B_256: IHash;
12081208begin
12091209 Result := THashFactory.TCrypto.CreateBlake2B
1210- (TBlake2BConfig.Create(THashSize.hsHashSize256 ) as IBlake2BConfig);
1210+ (TBlake2BConfig.Create(THashSize.Size256 ) as IBlake2BConfig);
12111211end ;
12121212
12131213class function THashFactory.TCrypto .CreateBlake2B_384: IHash;
12141214begin
12151215 Result := THashFactory.TCrypto.CreateBlake2B
1216- (TBlake2BConfig.Create(THashSize.hsHashSize384 ) as IBlake2BConfig);
1216+ (TBlake2BConfig.Create(THashSize.Size384 ) as IBlake2BConfig);
12171217end ;
12181218
12191219class function THashFactory.TCrypto .CreateBlake2B_512: IHash;
12201220begin
12211221 Result := THashFactory.TCrypto.CreateBlake2B
1222- (TBlake2BConfig.Create(THashSize.hsHashSize512 ) as IBlake2BConfig);
1222+ (TBlake2BConfig.Create(THashSize.Size512 ) as IBlake2BConfig);
12231223end ;
12241224
12251225class function THashFactory.TCrypto .CreateBlake2S(const AConfig: IBlake2SConfig;
@@ -1238,25 +1238,25 @@ class function THashFactory.TCrypto.CreateBlake2S(const AConfig: IBlake2SConfig;
12381238class function THashFactory.TCrypto .CreateBlake2S_128: IHash;
12391239begin
12401240 Result := THashFactory.TCrypto.CreateBlake2S
1241- (TBlake2SConfig.Create(THashSize.hsHashSize128 ) as IBlake2SConfig);
1241+ (TBlake2SConfig.Create(THashSize.Size128 ) as IBlake2SConfig);
12421242end ;
12431243
12441244class function THashFactory.TCrypto .CreateBlake2S_160: IHash;
12451245begin
12461246 Result := THashFactory.TCrypto.CreateBlake2S
1247- (TBlake2SConfig.Create(THashSize.hsHashSize160 ) as IBlake2SConfig);
1247+ (TBlake2SConfig.Create(THashSize.Size160 ) as IBlake2SConfig);
12481248end ;
12491249
12501250class function THashFactory.TCrypto .CreateBlake2S_224: IHash;
12511251begin
12521252 Result := THashFactory.TCrypto.CreateBlake2S
1253- (TBlake2SConfig.Create(THashSize.hsHashSize224 ) as IBlake2SConfig);
1253+ (TBlake2SConfig.Create(THashSize.Size224 ) as IBlake2SConfig);
12541254end ;
12551255
12561256class function THashFactory.TCrypto .CreateBlake2S_256: IHash;
12571257begin
12581258 Result := THashFactory.TCrypto.CreateBlake2S
1259- (TBlake2SConfig.Create(THashSize.hsHashSize256 ) as IBlake2SConfig);
1259+ (TBlake2SConfig.Create(THashSize.Size256 ) as IBlake2SConfig);
12601260end ;
12611261
12621262class function THashFactory.TCrypto .CreateBlake2BP(AHashSize: Int32;
@@ -1274,7 +1274,7 @@ class function THashFactory.TCrypto.CreateBlake2SP(AHashSize: Int32;
12741274class function THashFactory.TCrypto .CreateBlake3_256
12751275 (const AKey: THashLibByteArray): IHash;
12761276begin
1277- Result := TBlake3.Create(THashSize.hsHashSize256 , AKey);
1277+ Result := TBlake3.Create(THashSize.Size256 , AKey);
12781278end ;
12791279
12801280class function THashFactory.TCrypto .CreateSnefru(ASecurityLevel: Int32;
@@ -1284,7 +1284,7 @@ class function THashFactory.TCrypto.CreateSnefru(ASecurityLevel: Int32;
12841284 raise EArgumentHashLibException.CreateRes(@SInvalidSnefruLevel);
12851285
12861286 case AHashSize of
1287- THashSize.hsHashSize128 , THashSize.hsHashSize256 :
1287+ THashSize.Size128 , THashSize.Size256 :
12881288 Result := TSnefru.Create(ASecurityLevel, AHashSize);
12891289 else
12901290 raise EArgumentHashLibException.CreateRes(@SInvalidSnefruHashSize);
@@ -1294,12 +1294,12 @@ class function THashFactory.TCrypto.CreateSnefru(ASecurityLevel: Int32;
12941294
12951295class function THashFactory.TCrypto .CreateSnefru_8_128: IHash;
12961296begin
1297- Result := CreateSnefru(8 , THashSize.hsHashSize128 );
1297+ Result := CreateSnefru(8 , THashSize.Size128 );
12981298end ;
12991299
13001300class function THashFactory.TCrypto .CreateSnefru_8_256: IHash;
13011301begin
1302- Result := CreateSnefru(8 , THashSize.hsHashSize256 );
1302+ Result := CreateSnefru(8 , THashSize.Size256 );
13031303end ;
13041304
13051305class function THashFactory.TCrypto .CreateTiger_3_128: IHash;
0 commit comments