Skip to content

Commit

Permalink
Corrected wrong XMLDOC comment for IFiller parameter of Init method
Browse files Browse the repository at this point in the history
Part of issue #72
  • Loading branch information
Markus Humm committed May 8, 2024
1 parent a5889fa commit f716a97
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 41 deletions.
37 changes: 16 additions & 21 deletions Source/DECCipherBase.pas
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,9 @@ TDECCipher = class(TDECObject)
/// Size of the initialization vector in bytes
/// </param>
/// <param name="IFiller">
/// optional parameter defining the value with which the last block will
/// be filled up if the size of the data to be processed cannot be divided
/// by block size without reminder. Means: if the last block is not
/// completely filled with data.
/// Optional parameter defining the value with which the initialization
/// vector is prefilled. So it will contain something defined in any unused
/// bytes if a value shorter than the required IV size is given for the IV.
/// </param>
procedure Init(const Key; Size: Integer; const IVector; IVectorSize: Integer; IFiller: Byte = $FF); overload;
/// <summary>
Expand All @@ -501,10 +500,9 @@ TDECCipher = class(TDECObject)
/// Mode property
/// </param>
/// <param name="IFiller">
/// optional parameter defining the value with which the last block will
/// be filled up if the size of the data to be processed cannot be divided
/// by block size without reminder. Means: if the last block is not
/// completely filled with data.
/// Optional parameter defining the value with which the initialization
/// vector is prefilled. So it will contain something defined in any unused
/// bytes if a value shorter than the required IV size is given for the IV.
/// </param>
procedure Init(const Key: TBytes; const IVector: TBytes; IFiller: Byte = $FF); overload;
/// <summary>
Expand All @@ -522,10 +520,9 @@ TDECCipher = class(TDECObject)
/// Mode property
/// </param>
/// <param name="IFiller">
/// optional parameter defining the value with which the last block will
/// be filled up if the size of the data to be processed cannot be divided
/// by block size without reminder. Means: if the last block is not
/// completely filled with data.
/// Optional parameter defining the value with which the initialization
/// vector is prefilled. So it will contain something defined in any unused
/// bytes if a value shorter than the required IV size is given for the IV.
/// </param>
procedure Init(const Key: RawByteString; const IVector: RawByteString = ''; IFiller: Byte = $FF); overload;
{$IFDEF ANSISTRINGSUPPORTED}
Expand All @@ -545,10 +542,9 @@ TDECCipher = class(TDECObject)
/// Mode property
/// </param>
/// <param name="IFiller">
/// optional parameter defining the value with which the last block will
/// be filled up if the size of the data to be processed cannot be divided
/// by block size without reminder. Means: if the last block is not
/// completely filled with data.
/// Optional parameter defining the value with which the initialization
/// vector is prefilled. So it will contain something defined in any unused
/// bytes if a value shorter than the required IV size is given for the IV.
/// </param>
procedure Init(const Key: AnsiString; const IVector: AnsiString = ''; IFiller: Byte = $FF); overload;
{$ENDIF}
Expand All @@ -569,10 +565,9 @@ TDECCipher = class(TDECObject)
/// Mode property
/// </param>
/// <param name="IFiller">
/// optional parameter defining the value with which the last block will
/// be filled up if the size of the data to be processed cannot be divided
/// by block size without reminder. Means: if the last block is not
/// completely filled with data.
/// Optional parameter defining the value with which the initialization
/// vector is prefilled. So it will contain something defined in any unused
/// bytes if a value shorter than the required IV size is given for the IV.
/// </param>
procedure Init(const Key: WideString; const IVector: WideString = ''; IFiller: Byte = $FF); overload;
{$ENDIF}
Expand Down Expand Up @@ -979,7 +974,7 @@ procedure TDECCipher.Init(const Key; Size: Integer; const IVector; IVectorSize:
if (IVectorSize > 0) then
Move(IVector, OriginalInitVector[0], IVectorSize);

// GCM needs same treatment as empty IV even if IV specified
// GCM needs same treatment of empty IV even if IV specified
if (IVectorSize = 0) or (FMode = cmGCM) then
begin
DoEncode(FInitializationVector, FInitializationVector, FBufferSize);
Expand Down
35 changes: 15 additions & 20 deletions Source/DECCipherInterface.pas
Original file line number Diff line number Diff line change
Expand Up @@ -484,10 +484,9 @@ interface
/// Size of the initialization vector in bytes
/// </param>
/// <param name="IFiller">
/// optional parameter defining the value with which the last block will
/// be filled up if the size of the data to be processed cannot be divided
/// by block size without reminder. Means: if the last block is not
/// completely filled with data.
/// Optional parameter defining the value with which the initialization
/// vector is prefilled. So it will contain something defined in any unused
/// bytes if a value shorter than the required IV size is given for the IV.
/// </param>
procedure Init(const Key; Size: Integer; const IVector; IVectorSize: Integer; IFiller: Byte = $FF); overload;
/// <summary>
Expand All @@ -505,10 +504,9 @@ interface
/// Mode property
/// </param>
/// <param name="IFiller">
/// optional parameter defining the value with which the last block will
/// be filled up if the size of the data to be processed cannot be divided
/// by block size without reminder. Means: if the last block is not
/// completely filled with data.
/// Optional parameter defining the value with which the initialization
/// vector is prefilled. So it will contain something defined in any unused
/// bytes if a value shorter than the required IV size is given for the IV.
/// </param>
procedure Init(const Key: TBytes; const IVector: TBytes; IFiller: Byte = $FF); overload;
/// <summary>
Expand All @@ -526,10 +524,9 @@ interface
/// Mode property
/// </param>
/// <param name="IFiller">
/// optional parameter defining the value with which the last block will
/// be filled up if the size of the data to be processed cannot be divided
/// by block size without reminder. Means: if the last block is not
/// completely filled with data.
/// Optional parameter defining the value with which the initialization
/// vector is prefilled. So it will contain something defined in any unused
/// bytes if a value shorter than the required IV size is given for the IV.
/// </param>
procedure Init(const Key: RawByteString; const IVector: RawByteString = ''; IFiller: Byte = $FF); overload;
{$IFDEF ANSISTRINGSUPPORTED}
Expand All @@ -549,10 +546,9 @@ interface
/// Mode property
/// </param>
/// <param name="IFiller">
/// optional parameter defining the value with which the last block will
/// be filled up if the size of the data to be processed cannot be divided
/// by block size without reminder. Means: if the last block is not
/// completely filled with data.
/// Optional parameter defining the value with which the initialization
/// vector is prefilled. So it will contain something defined in any unused
/// bytes if a value shorter than the required IV size is given for the IV.
/// </param>
procedure Init(const Key: AnsiString; const IVector: AnsiString = ''; IFiller: Byte = $FF); overload;
{$ENDIF}
Expand All @@ -573,10 +569,9 @@ interface
/// Mode property
/// </param>
/// <param name="IFiller">
/// optional parameter defining the value with which the last block will
/// be filled up if the size of the data to be processed cannot be divided
/// by block size without reminder. Means: if the last block is not
/// completely filled with data.
/// Optional parameter defining the value with which the initialization
/// vector is prefilled. So it will contain something defined in any unused
/// bytes if a value shorter than the required IV size is given for the IV.
/// </param>
procedure Init(const Key: WideString; const IVector: WideString = ''; IFiller: Byte = $FF); overload;
{$ENDIF}
Expand Down

0 comments on commit f716a97

Please sign in to comment.