"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "examples/dbcrypt/cryptDb.pas" between
Firebird-3.0.2.32703-0.tar.bz2 and Firebird-3.0.4.33054-0.tar.bz2

About: Firebird is a relational database offering many ANSI SQL standard features.

cryptDb.pas  (Firebird-3.0.2.32703-0.tar.bz2):cryptDb.pas  (Firebird-3.0.4.33054-0.tar.bz2)
skipping to change at line 50 skipping to change at line 50
FRegistered: Boolean; FRegistered: Boolean;
public public
constructor Create; constructor Create;
destructor Destroy; override; destructor Destroy; override;
procedure registerMe; procedure registerMe;
// TPluginModule implementation // TPluginModule implementation
procedure doClean; override; procedure doClean; override;
procedure threadDetach; override;
end; end;
TMyCrypt = class(IDbCryptPluginImpl) TMyCrypt = class(IDbCryptPluginImpl)
private private
FCounter: Integer; FCounter: Integer;
FOwner: IReferenceCounted; FOwner: IReferenceCounted;
FConfig: IPluginConfig; FConfig: IPluginConfig;
public public
constructor Create(config: IPluginConfig); constructor Create(config: IPluginConfig);
skipping to change at line 74 skipping to change at line 75
function release: Integer; override; function release: Integer; override;
// TPluginBase implementation // TPluginBase implementation
procedure setOwner(ref: IReferenceCounted); override; procedure setOwner(ref: IReferenceCounted); override;
function getOwner: IReferenceCounted; override; function getOwner: IReferenceCounted; override;
// TCryptPlugin implementation // TCryptPlugin implementation
procedure setKey(status: IStatus; length: Cardinal; sources: IKeyHolderPlugi nPtr; keyName: PAnsiChar); override; procedure setKey(status: IStatus; length: Cardinal; sources: IKeyHolderPlugi nPtr; keyName: PAnsiChar); override;
procedure encrypt(status: IStatus; length: Cardinal; src, dst: Pointer); ove rride; procedure encrypt(status: IStatus; length: Cardinal; src, dst: Pointer); ove rride;
procedure decrypt(status: IStatus; length: Cardinal; src, dst: Pointer); ove rride; procedure decrypt(status: IStatus; length: Cardinal; src, dst: Pointer); ove rride;
procedure setInfo(status: IStatus; info: IDbCryptInfo); override;
private private
procedure pxor(length: Cardinal; mem: Pointer); procedure pxor(length: Cardinal; mem: Pointer);
end; end;
TMyFactory = class(IPluginFactoryImpl) TMyFactory = class(IPluginFactoryImpl)
public public
constructor Create(module: IPluginModule); constructor Create(module: IPluginModule);
destructor Destroy; override; destructor Destroy; override;
skipping to change at line 117 skipping to change at line 119
end; end;
inherited; inherited;
end; end;
procedure TMyPluginModule.doClean; procedure TMyPluginModule.doClean;
begin begin
FRegistered := False; FRegistered := False;
end; end;
procedure TMyPluginModule.threadDetach;
begin
end;
procedure TMyPluginModule.registerMe; procedure TMyPluginModule.registerMe;
begin begin
if not FRegistered then if not FRegistered then
begin begin
Master.getPluginManager.registerModule(Self); Master.getPluginManager.registerModule(Self);
FRegistered := True; FRegistered := True;
end end
end; end;
{ TMyFactory } { TMyFactory }
skipping to change at line 182 skipping to change at line 188
procedure TMyCrypt.setOwner(ref: IReferenceCounted); procedure TMyCrypt.setOwner(ref: IReferenceCounted);
begin begin
FOwner := ref; FOwner := ref;
end; end;
function TMyCrypt.getOwner: IReferenceCounted; function TMyCrypt.getOwner: IReferenceCounted;
begin begin
Result := FOwner; Result := FOwner;
end; end;
procedure TMyCrypt.setInfo(status: IStatus; info: IDbCryptInfo);
begin
status.init;
// do nothing in this trivial sample
end;
procedure TMyCrypt.decrypt(status: IStatus; length: Cardinal; src, dst: Pointer) ; procedure TMyCrypt.decrypt(status: IStatus; length: Cardinal; src, dst: Pointer) ;
begin begin
status.init; status.init;
// decrypt here // decrypt here
Move(src^, dst^, length); Move(src^, dst^, length);
pxor(length, dst); pxor(length, dst);
end; end;
procedure TMyCrypt.encrypt(status: IStatus; length: Cardinal; src, dst: Pointer) ; procedure TMyCrypt.encrypt(status: IStatus; length: Cardinal; src, dst: Pointer) ;
 End of changes. 4 change blocks. 
0 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)