AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Shop-Zugangsdaten verschlüsseln

Ein Thema von freimatz · begonnen am 25. Aug 2018 · letzter Beitrag vom 10. Sep 2018
 
Schokohase
(Gast)

n/a Beiträge
 
#12

AW: Shop-Zugangsdaten verschlüsseln

  Alt 4. Sep 2018, 14:37
Nichts was ein Class Helper nicht lösen könnte

Delphi-Quellcode:
uses
  System.Classes, System.IniFiles, System.SysUtils;

type
  TCustomIniFileHelper = class helper for TCustomIniFile
  public
    function ReadBytes( const Section, Name: string ): TBytes;
    procedure WriteBytes( const Section, Name: string; const Value: TBytes );
  end;

implementation

{ TCustomIniFileHelper }

function TCustomIniFileHelper.ReadBytes( const Section, Name: string ): TBytes;
var
  stream: TBytesStream;
begin
  stream := TBytesStream.Create( );
  try
    Self.ReadBinaryStream( Section, Name, stream );
    Result := stream.Bytes;
  finally
    stream.Free( );
  end;
end;

procedure TCustomIniFileHelper.WriteBytes( const Section, Name: string; const Value: TBytes );
var
  stream: TBytesStream;
begin
  stream := TBytesStream.Create( Value );
  try
    Self.WriteBinaryStream( Section, Name, stream );
  finally
    stream.Free( );
  end;
end;
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 03:20 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz