Sample code for 30+ languages & platforms
Delphi DLL

Decode Base64

Demonstrates how to decode base64.

Chilkat Delphi DLL Downloads

Delphi DLL
uses
    Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
    Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, BinData;

...

procedure TForm1.Button1Click(Sender: TObject);
var
success: Boolean;
bd: HCkBinData;
password: PWideChar;

begin
success := False;

bd := CkBinData_Create();

// Append a base64 string to bd.
success := CkBinData_AppendEncoded(bd,'c2VjcmV0','base64');

// The bd now contains the decoded bytes.
// Let's say it was a password string..
password := CkBinData__getString(bd,'utf-8');

// Decodes to "secret".
Memo1.Lines.Add('password = ' + password);

CkBinData_Dispose(bd);

end;