• R/O
  • SSH
  • HTTPS

dzotp: Commit


Commit MetaInfo

Revision2 (tree)
Time2021-09-28 03:58:18
Authordummzeuch

Log Message

initial check in of first working version (externals to follow)

Change Summary

Incremental Difference

--- trunk/src/dzOTP.dpr (nonexistent)
+++ trunk/src/dzOTP.dpr (revision 2)
@@ -0,0 +1,17 @@
1+program dzOTP;
2+
3+uses
4+ Vcl.Forms,
5+ w_dzOTP in 'w_dzOTP.pas' {f_dzOTP},
6+ Vcl.Themes,
7+ Vcl.Styles;
8+
9+{$R *.res}
10+
11+begin
12+ Application.Initialize;
13+ Application.MainFormOnTaskbar := True;
14+ Application.Title := 'dummzeuch OTP Tool';
15+ Application.CreateForm(Tf_dzOTP, f_dzOTP);
16+ Application.Run;
17+end.
--- trunk/src/dzOTP.dproj (nonexistent)
+++ trunk/src/dzOTP.dproj (revision 2)
@@ -0,0 +1,560 @@
1+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+ <PropertyGroup>
3+ <ProjectGuid>{3C6B9479-9154-498D-A84D-1E490A9ADE97}</ProjectGuid>
4+ <ProjectVersion>18.4</ProjectVersion>
5+ <FrameworkType>VCL</FrameworkType>
6+ <MainSource>dzOTP.dpr</MainSource>
7+ <Base>True</Base>
8+ <Config Condition="'$(Config)'==''">Debug</Config>
9+ <Platform Condition="'$(Platform)'==''">Win32</Platform>
10+ <TargetedPlatforms>1</TargetedPlatforms>
11+ <AppType>Application</AppType>
12+ </PropertyGroup>
13+ <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
14+ <Base>true</Base>
15+ </PropertyGroup>
16+ <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
17+ <Base_Win32>true</Base_Win32>
18+ <CfgParent>Base</CfgParent>
19+ <Base>true</Base>
20+ </PropertyGroup>
21+ <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
22+ <Cfg_1>true</Cfg_1>
23+ <CfgParent>Base</CfgParent>
24+ <Base>true</Base>
25+ </PropertyGroup>
26+ <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
27+ <Cfg_1_Win32>true</Cfg_1_Win32>
28+ <CfgParent>Cfg_1</CfgParent>
29+ <Cfg_1>true</Cfg_1>
30+ <Base>true</Base>
31+ </PropertyGroup>
32+ <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
33+ <Cfg_2>true</Cfg_2>
34+ <CfgParent>Base</CfgParent>
35+ <Base>true</Base>
36+ </PropertyGroup>
37+ <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
38+ <Cfg_2_Win32>true</Cfg_2_Win32>
39+ <CfgParent>Cfg_2</CfgParent>
40+ <Cfg_2>true</Cfg_2>
41+ <Base>true</Base>
42+ </PropertyGroup>
43+ <PropertyGroup Condition="'$(Base)'!=''">
44+ <DCC_DcuOutput>..\dcu\$(Platform)\$(Config)</DCC_DcuOutput>
45+ <DCC_ExeOutput>..\</DCC_ExeOutput>
46+ <DCC_E>false</DCC_E>
47+ <DCC_N>false</DCC_N>
48+ <DCC_S>false</DCC_S>
49+ <DCC_F>false</DCC_F>
50+ <DCC_K>false</DCC_K>
51+ <DCC_UsePackage>RESTComponents;FireDAC;FireDACSqliteDriver;soaprtl;FireDACIBDriver;soapmidas;FireDACCommon;RESTBackendComponents;soapserver;CloudService;FireDACCommonDriver;inet;$(DCC_UsePackage)</DCC_UsePackage>
52+ <DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
53+ <Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
54+ <UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
55+ <UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
56+ <SanitizedProjectName>dzOTP</SanitizedProjectName>
57+ <VerInfo_Locale>2057</VerInfo_Locale>
58+ <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
59+ <DCC_MapFile>3</DCC_MapFile>
60+ <DCC_UnitSearchPath>..\..\SimpleBaseLib4Pascal\SimpleBaseLib\src\Interfaces;..\..\SimpleBaseLib4Pascal\SimpleBaseLib\src\Bases;..\..\SimpleBaseLib4Pascal\SimpleBaseLib\src\Utils;..\..\DelphiOTP;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
61+ </PropertyGroup>
62+ <PropertyGroup Condition="'$(Base_Win32)'!=''">
63+ <DCC_UsePackage>DBXSqliteDriver;bindcompdbx;IndyIPCommon;DBXInterBaseDriver;vcl;IndyIPServer;vclactnband;vclFireDAC;IndySystem;tethering;svnui;dsnapcon;FireDACADSDriver;FireDACMSAccDriver;fmxFireDAC;vclimg;vcltouch;vcldb;bindcompfmx;svn;FireDACPgDriver;inetdb;DbxCommonDriver;fmx;fmxdae;xmlrtl;fmxobj;vclwinx;rtl;DbxClientDriver;CustomIPTransport;vcldsnap;dbexpress;IndyCore;vclx;bindcomp;appanalytics;dsnap;IndyIPClient;bindcompvcl;VCLRESTComponents;dbxcds;VclSmp;adortl;vclie;bindengine;DBXMySQLDriver;dsnapxml;FireDACMySQLDriver;dbrtl;inetdbxpress;IndyProtocols;FireDACCommonODBC;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
64+ <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
65+ <BT_BuildType>Debug</BT_BuildType>
66+ <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
67+ <VerInfo_Locale>1033</VerInfo_Locale>
68+ <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
69+ </PropertyGroup>
70+ <PropertyGroup Condition="'$(Cfg_1)'!=''">
71+ <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
72+ <DCC_DebugDCUs>true</DCC_DebugDCUs>
73+ <DCC_Optimize>false</DCC_Optimize>
74+ <DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
75+ </PropertyGroup>
76+ <PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
77+ <DCC_RemoteDebug>false</DCC_RemoteDebug>
78+ <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
79+ <AppEnableHighDPI>true</AppEnableHighDPI>
80+ <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
81+ <VerInfo_Locale>1033</VerInfo_Locale>
82+ </PropertyGroup>
83+ <PropertyGroup Condition="'$(Cfg_2)'!=''">
84+ <DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
85+ <DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
86+ <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
87+ <DCC_DebugInformation>0</DCC_DebugInformation>
88+ </PropertyGroup>
89+ <PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
90+ <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
91+ <AppEnableHighDPI>true</AppEnableHighDPI>
92+ <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
93+ <VerInfo_Locale>1033</VerInfo_Locale>
94+ </PropertyGroup>
95+ <ItemGroup>
96+ <DelphiCompile Include="$(MainSource)">
97+ <MainSource>MainSource</MainSource>
98+ </DelphiCompile>
99+ <DCCReference Include="w_dzOTP.pas">
100+ <Form>f_dzOTP</Form>
101+ <FormType>dfm</FormType>
102+ </DCCReference>
103+ <BuildConfiguration Include="Release">
104+ <Key>Cfg_2</Key>
105+ <CfgParent>Base</CfgParent>
106+ </BuildConfiguration>
107+ <BuildConfiguration Include="Base">
108+ <Key>Base</Key>
109+ </BuildConfiguration>
110+ <BuildConfiguration Include="Debug">
111+ <Key>Cfg_1</Key>
112+ <CfgParent>Base</CfgParent>
113+ </BuildConfiguration>
114+ </ItemGroup>
115+ <ProjectExtensions>
116+ <Borland.Personality>Delphi.Personality.12</Borland.Personality>
117+ <Borland.ProjectType>Application</Borland.ProjectType>
118+ <BorlandProject>
119+ <Delphi.Personality>
120+ <Source>
121+ <Source Name="MainSource">dzOTP.dpr</Source>
122+ </Source>
123+ <Excluded_Packages>
124+ <Excluded_Packages Name="$(BDSBIN)\dcloffice2k250.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
125+ <Excluded_Packages Name="$(BDSBIN)\dclofficexp250.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
126+ </Excluded_Packages>
127+ </Delphi.Personality>
128+ <Deployment Version="3">
129+ <DeployFile LocalName="..\dzOTP.exe" Configuration="Debug" Class="ProjectOutput">
130+ <Platform Name="Win32">
131+ <RemoteName>dzOTP.exe</RemoteName>
132+ <Overwrite>true</Overwrite>
133+ </Platform>
134+ </DeployFile>
135+ <DeployClass Name="AdditionalDebugSymbols">
136+ <Platform Name="iOSSimulator">
137+ <Operation>1</Operation>
138+ </Platform>
139+ <Platform Name="OSX32">
140+ <RemoteDir>Contents\MacOS</RemoteDir>
141+ <Operation>1</Operation>
142+ </Platform>
143+ <Platform Name="Win32">
144+ <RemoteDir>Contents\MacOS</RemoteDir>
145+ <Operation>0</Operation>
146+ </Platform>
147+ </DeployClass>
148+ <DeployClass Name="AndroidClassesDexFile">
149+ <Platform Name="Android">
150+ <RemoteDir>classes</RemoteDir>
151+ <Operation>1</Operation>
152+ </Platform>
153+ </DeployClass>
154+ <DeployClass Name="AndroidGDBServer">
155+ <Platform Name="Android">
156+ <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
157+ <Operation>1</Operation>
158+ </Platform>
159+ </DeployClass>
160+ <DeployClass Name="AndroidLibnativeArmeabiFile">
161+ <Platform Name="Android">
162+ <RemoteDir>library\lib\armeabi</RemoteDir>
163+ <Operation>1</Operation>
164+ </Platform>
165+ </DeployClass>
166+ <DeployClass Name="AndroidLibnativeMipsFile">
167+ <Platform Name="Android">
168+ <RemoteDir>library\lib\mips</RemoteDir>
169+ <Operation>1</Operation>
170+ </Platform>
171+ </DeployClass>
172+ <DeployClass Name="AndroidServiceOutput">
173+ <Platform Name="Android">
174+ <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
175+ <Operation>1</Operation>
176+ </Platform>
177+ </DeployClass>
178+ <DeployClass Name="AndroidSplashImageDef">
179+ <Platform Name="Android">
180+ <RemoteDir>res\drawable</RemoteDir>
181+ <Operation>1</Operation>
182+ </Platform>
183+ </DeployClass>
184+ <DeployClass Name="AndroidSplashStyles">
185+ <Platform Name="Android">
186+ <RemoteDir>res\values</RemoteDir>
187+ <Operation>1</Operation>
188+ </Platform>
189+ </DeployClass>
190+ <DeployClass Name="Android_DefaultAppIcon">
191+ <Platform Name="Android">
192+ <RemoteDir>res\drawable</RemoteDir>
193+ <Operation>1</Operation>
194+ </Platform>
195+ </DeployClass>
196+ <DeployClass Name="Android_LauncherIcon144">
197+ <Platform Name="Android">
198+ <RemoteDir>res\drawable-xxhdpi</RemoteDir>
199+ <Operation>1</Operation>
200+ </Platform>
201+ </DeployClass>
202+ <DeployClass Name="Android_LauncherIcon36">
203+ <Platform Name="Android">
204+ <RemoteDir>res\drawable-ldpi</RemoteDir>
205+ <Operation>1</Operation>
206+ </Platform>
207+ </DeployClass>
208+ <DeployClass Name="Android_LauncherIcon48">
209+ <Platform Name="Android">
210+ <RemoteDir>res\drawable-mdpi</RemoteDir>
211+ <Operation>1</Operation>
212+ </Platform>
213+ </DeployClass>
214+ <DeployClass Name="Android_LauncherIcon72">
215+ <Platform Name="Android">
216+ <RemoteDir>res\drawable-hdpi</RemoteDir>
217+ <Operation>1</Operation>
218+ </Platform>
219+ </DeployClass>
220+ <DeployClass Name="Android_LauncherIcon96">
221+ <Platform Name="Android">
222+ <RemoteDir>res\drawable-xhdpi</RemoteDir>
223+ <Operation>1</Operation>
224+ </Platform>
225+ </DeployClass>
226+ <DeployClass Name="Android_SplashImage426">
227+ <Platform Name="Android">
228+ <RemoteDir>res\drawable-small</RemoteDir>
229+ <Operation>1</Operation>
230+ </Platform>
231+ </DeployClass>
232+ <DeployClass Name="Android_SplashImage470">
233+ <Platform Name="Android">
234+ <RemoteDir>res\drawable-normal</RemoteDir>
235+ <Operation>1</Operation>
236+ </Platform>
237+ </DeployClass>
238+ <DeployClass Name="Android_SplashImage640">
239+ <Platform Name="Android">
240+ <RemoteDir>res\drawable-large</RemoteDir>
241+ <Operation>1</Operation>
242+ </Platform>
243+ </DeployClass>
244+ <DeployClass Name="Android_SplashImage960">
245+ <Platform Name="Android">
246+ <RemoteDir>res\drawable-xlarge</RemoteDir>
247+ <Operation>1</Operation>
248+ </Platform>
249+ </DeployClass>
250+ <DeployClass Name="DebugSymbols">
251+ <Platform Name="iOSSimulator">
252+ <Operation>1</Operation>
253+ </Platform>
254+ <Platform Name="OSX32">
255+ <RemoteDir>Contents\MacOS</RemoteDir>
256+ <Operation>1</Operation>
257+ </Platform>
258+ <Platform Name="Win32">
259+ <Operation>0</Operation>
260+ </Platform>
261+ </DeployClass>
262+ <DeployClass Name="DependencyFramework">
263+ <Platform Name="OSX32">
264+ <RemoteDir>Contents\MacOS</RemoteDir>
265+ <Operation>1</Operation>
266+ <Extensions>.framework</Extensions>
267+ </Platform>
268+ <Platform Name="Win32">
269+ <Operation>0</Operation>
270+ </Platform>
271+ </DeployClass>
272+ <DeployClass Name="DependencyModule">
273+ <Platform Name="iOSDevice32">
274+ <Operation>1</Operation>
275+ <Extensions>.dylib</Extensions>
276+ </Platform>
277+ <Platform Name="iOSDevice64">
278+ <Operation>1</Operation>
279+ <Extensions>.dylib</Extensions>
280+ </Platform>
281+ <Platform Name="iOSSimulator">
282+ <Operation>1</Operation>
283+ <Extensions>.dylib</Extensions>
284+ </Platform>
285+ <Platform Name="OSX32">
286+ <RemoteDir>Contents\MacOS</RemoteDir>
287+ <Operation>1</Operation>
288+ <Extensions>.dylib</Extensions>
289+ </Platform>
290+ <Platform Name="Win32">
291+ <Operation>0</Operation>
292+ <Extensions>.dll;.bpl</Extensions>
293+ </Platform>
294+ </DeployClass>
295+ <DeployClass Required="true" Name="DependencyPackage">
296+ <Platform Name="iOSDevice32">
297+ <Operation>1</Operation>
298+ <Extensions>.dylib</Extensions>
299+ </Platform>
300+ <Platform Name="iOSDevice64">
301+ <Operation>1</Operation>
302+ <Extensions>.dylib</Extensions>
303+ </Platform>
304+ <Platform Name="iOSSimulator">
305+ <Operation>1</Operation>
306+ <Extensions>.dylib</Extensions>
307+ </Platform>
308+ <Platform Name="OSX32">
309+ <RemoteDir>Contents\MacOS</RemoteDir>
310+ <Operation>1</Operation>
311+ <Extensions>.dylib</Extensions>
312+ </Platform>
313+ <Platform Name="Win32">
314+ <Operation>0</Operation>
315+ <Extensions>.bpl</Extensions>
316+ </Platform>
317+ </DeployClass>
318+ <DeployClass Name="File">
319+ <Platform Name="Android">
320+ <Operation>0</Operation>
321+ </Platform>
322+ <Platform Name="iOSDevice32">
323+ <Operation>0</Operation>
324+ </Platform>
325+ <Platform Name="iOSDevice64">
326+ <Operation>0</Operation>
327+ </Platform>
328+ <Platform Name="iOSSimulator">
329+ <Operation>0</Operation>
330+ </Platform>
331+ <Platform Name="OSX32">
332+ <RemoteDir>Contents\Resources\StartUp\</RemoteDir>
333+ <Operation>0</Operation>
334+ </Platform>
335+ <Platform Name="Win32">
336+ <Operation>0</Operation>
337+ </Platform>
338+ </DeployClass>
339+ <DeployClass Name="iPad_Launch1024">
340+ <Platform Name="iOSDevice32">
341+ <Operation>1</Operation>
342+ </Platform>
343+ <Platform Name="iOSDevice64">
344+ <Operation>1</Operation>
345+ </Platform>
346+ <Platform Name="iOSSimulator">
347+ <Operation>1</Operation>
348+ </Platform>
349+ </DeployClass>
350+ <DeployClass Name="iPad_Launch1536">
351+ <Platform Name="iOSDevice32">
352+ <Operation>1</Operation>
353+ </Platform>
354+ <Platform Name="iOSDevice64">
355+ <Operation>1</Operation>
356+ </Platform>
357+ <Platform Name="iOSSimulator">
358+ <Operation>1</Operation>
359+ </Platform>
360+ </DeployClass>
361+ <DeployClass Name="iPad_Launch2048">
362+ <Platform Name="iOSDevice32">
363+ <Operation>1</Operation>
364+ </Platform>
365+ <Platform Name="iOSDevice64">
366+ <Operation>1</Operation>
367+ </Platform>
368+ <Platform Name="iOSSimulator">
369+ <Operation>1</Operation>
370+ </Platform>
371+ </DeployClass>
372+ <DeployClass Name="iPad_Launch768">
373+ <Platform Name="iOSDevice32">
374+ <Operation>1</Operation>
375+ </Platform>
376+ <Platform Name="iOSDevice64">
377+ <Operation>1</Operation>
378+ </Platform>
379+ <Platform Name="iOSSimulator">
380+ <Operation>1</Operation>
381+ </Platform>
382+ </DeployClass>
383+ <DeployClass Name="iPhone_Launch320">
384+ <Platform Name="iOSDevice32">
385+ <Operation>1</Operation>
386+ </Platform>
387+ <Platform Name="iOSDevice64">
388+ <Operation>1</Operation>
389+ </Platform>
390+ <Platform Name="iOSSimulator">
391+ <Operation>1</Operation>
392+ </Platform>
393+ </DeployClass>
394+ <DeployClass Name="iPhone_Launch640">
395+ <Platform Name="iOSDevice32">
396+ <Operation>1</Operation>
397+ </Platform>
398+ <Platform Name="iOSDevice64">
399+ <Operation>1</Operation>
400+ </Platform>
401+ <Platform Name="iOSSimulator">
402+ <Operation>1</Operation>
403+ </Platform>
404+ </DeployClass>
405+ <DeployClass Name="iPhone_Launch640x1136">
406+ <Platform Name="iOSDevice32">
407+ <Operation>1</Operation>
408+ </Platform>
409+ <Platform Name="iOSDevice64">
410+ <Operation>1</Operation>
411+ </Platform>
412+ <Platform Name="iOSSimulator">
413+ <Operation>1</Operation>
414+ </Platform>
415+ </DeployClass>
416+ <DeployClass Name="ProjectAndroidManifest">
417+ <Platform Name="Android">
418+ <Operation>1</Operation>
419+ </Platform>
420+ </DeployClass>
421+ <DeployClass Name="ProjectiOSDeviceDebug">
422+ <Platform Name="iOSDevice32">
423+ <RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
424+ <Operation>1</Operation>
425+ </Platform>
426+ <Platform Name="iOSDevice64">
427+ <RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
428+ <Operation>1</Operation>
429+ </Platform>
430+ </DeployClass>
431+ <DeployClass Name="ProjectiOSDeviceResourceRules">
432+ <Platform Name="iOSDevice32">
433+ <Operation>1</Operation>
434+ </Platform>
435+ <Platform Name="iOSDevice64">
436+ <Operation>1</Operation>
437+ </Platform>
438+ </DeployClass>
439+ <DeployClass Name="ProjectiOSEntitlements">
440+ <Platform Name="iOSDevice32">
441+ <RemoteDir>..\</RemoteDir>
442+ <Operation>1</Operation>
443+ </Platform>
444+ <Platform Name="iOSDevice64">
445+ <RemoteDir>..\</RemoteDir>
446+ <Operation>1</Operation>
447+ </Platform>
448+ </DeployClass>
449+ <DeployClass Name="ProjectiOSInfoPList">
450+ <Platform Name="iOSDevice32">
451+ <Operation>1</Operation>
452+ </Platform>
453+ <Platform Name="iOSDevice64">
454+ <Operation>1</Operation>
455+ </Platform>
456+ <Platform Name="iOSSimulator">
457+ <Operation>1</Operation>
458+ </Platform>
459+ </DeployClass>
460+ <DeployClass Name="ProjectiOSResource">
461+ <Platform Name="iOSDevice32">
462+ <Operation>1</Operation>
463+ </Platform>
464+ <Platform Name="iOSDevice64">
465+ <Operation>1</Operation>
466+ </Platform>
467+ <Platform Name="iOSSimulator">
468+ <Operation>1</Operation>
469+ </Platform>
470+ </DeployClass>
471+ <DeployClass Name="ProjectOSXEntitlements">
472+ <Platform Name="OSX32">
473+ <RemoteDir>..\</RemoteDir>
474+ <Operation>1</Operation>
475+ </Platform>
476+ </DeployClass>
477+ <DeployClass Name="ProjectOSXInfoPList">
478+ <Platform Name="OSX32">
479+ <RemoteDir>Contents</RemoteDir>
480+ <Operation>1</Operation>
481+ </Platform>
482+ </DeployClass>
483+ <DeployClass Name="ProjectOSXResource">
484+ <Platform Name="OSX32">
485+ <RemoteDir>Contents\Resources</RemoteDir>
486+ <Operation>1</Operation>
487+ </Platform>
488+ </DeployClass>
489+ <DeployClass Required="true" Name="ProjectOutput">
490+ <Platform Name="Android">
491+ <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
492+ <Operation>1</Operation>
493+ </Platform>
494+ <Platform Name="iOSDevice32">
495+ <Operation>1</Operation>
496+ </Platform>
497+ <Platform Name="iOSDevice64">
498+ <Operation>1</Operation>
499+ </Platform>
500+ <Platform Name="iOSSimulator">
501+ <Operation>1</Operation>
502+ </Platform>
503+ <Platform Name="Linux64">
504+ <Operation>1</Operation>
505+ </Platform>
506+ <Platform Name="OSX32">
507+ <RemoteDir>Contents\MacOS</RemoteDir>
508+ <Operation>1</Operation>
509+ </Platform>
510+ <Platform Name="Win32">
511+ <Operation>0</Operation>
512+ </Platform>
513+ </DeployClass>
514+ <DeployClass Name="ProjectUWPManifest">
515+ <Platform Name="Win32">
516+ <Operation>1</Operation>
517+ </Platform>
518+ <Platform Name="Win64">
519+ <Operation>1</Operation>
520+ </Platform>
521+ </DeployClass>
522+ <DeployClass Name="UWP_DelphiLogo150">
523+ <Platform Name="Win32">
524+ <RemoteDir>Assets</RemoteDir>
525+ <Operation>1</Operation>
526+ </Platform>
527+ <Platform Name="Win64">
528+ <RemoteDir>Assets</RemoteDir>
529+ <Operation>1</Operation>
530+ </Platform>
531+ </DeployClass>
532+ <DeployClass Name="UWP_DelphiLogo44">
533+ <Platform Name="Win32">
534+ <RemoteDir>Assets</RemoteDir>
535+ <Operation>1</Operation>
536+ </Platform>
537+ <Platform Name="Win64">
538+ <RemoteDir>Assets</RemoteDir>
539+ <Operation>1</Operation>
540+ </Platform>
541+ </DeployClass>
542+ <ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
543+ <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
544+ <ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
545+ <ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
546+ <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
547+ <ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
548+ <ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
549+ <ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
550+ </Deployment>
551+ <Platforms>
552+ <Platform value="Win32">True</Platform>
553+ </Platforms>
554+ </BorlandProject>
555+ <ProjectFileVersion>12</ProjectFileVersion>
556+ </ProjectExtensions>
557+ <Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
558+ <Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
559+ <Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>
560+</Project>
--- trunk/src/w_dzOTP.pas (nonexistent)
+++ trunk/src/w_dzOTP.pas (revision 2)
@@ -0,0 +1,276 @@
1+unit w_dzOTP;
2+
3+interface
4+
5+uses
6+ Winapi.Windows,
7+ Winapi.Messages,
8+ System.SysUtils,
9+ System.Classes,
10+ Vcl.Graphics,
11+ Vcl.Controls,
12+ Vcl.Forms,
13+ Vcl.Dialogs,
14+ Vcl.StdCtrls,
15+ Vcl.ExtCtrls,
16+ Vcl.ComCtrls;
17+
18+type
19+ Tf_dzOTP = class(TForm)
20+ pc_Main: TPageControl;
21+ ts_GenerateSecret: TTabSheet;
22+ ts_GenerateCode: TTabSheet;
23+ ts_CheckCode: TTabSheet;
24+ ed_SecretPlain: TEdit;
25+ l_SecretPlain: TLabel;
26+ ed_SecretBase32: TEdit;
27+ l_SecretBase32: TLabel;
28+ rg_OtpType: TRadioGroup;
29+ l_Identity: TLabel;
30+ ed_Identity: TEdit;
31+ l_Issuer: TLabel;
32+ ed_Issuer: TEdit;
33+ rg_Algorithm: TRadioGroup;
34+ rg_Digits: TRadioGroup;
35+ ed_PeriodOrCounter: TEdit;
36+ l_PeriodOrCounter: TLabel;
37+ ed_URI: TEdit;
38+ l_URI: TLabel;
39+ b_GenerateSecret: TButton;
40+ im_QrCode: TImage;
41+ ed_Generated: TEdit;
42+ b_GenerateCode: TButton;
43+ ed_Counter: TEdit;
44+ l_Counter: TLabel;
45+ ed_CodeToCheck: TEdit;
46+ l_CodeToCheck: TLabel;
47+ l_CheckResult: TLabel;
48+ procedure ed_IdentityChange(Sender: TObject);
49+ procedure rg_OtpTypeClick(Sender: TObject);
50+ procedure ed_PeriodOrCounterChange(Sender: TObject);
51+ procedure ed_SecretPlainChange(Sender: TObject);
52+ procedure ed_SecretBase32Change(Sender: TObject);
53+ procedure ed_IssuerChange(Sender: TObject);
54+ procedure rg_AlgorithmClick(Sender: TObject);
55+ procedure rg_DigitsClick(Sender: TObject);
56+ procedure b_GenerateSecretClick(Sender: TObject);
57+ procedure b_GenerateCodeClick(Sender: TObject);
58+ procedure ed_CodeToCheckChange(Sender: TObject);
59+ private
60+ FIsUpdating: Boolean;
61+ procedure CheckInput;
62+ public
63+ constructor Create(_Owner: TComponent); override;
64+ end;
65+
66+var
67+ f_dzOTP: Tf_dzOTP;
68+
69+implementation
70+
71+{$R *.dfm}
72+
73+uses
74+ SbpBase32,
75+ SbpIBase32,
76+ REST.Utils,
77+ DelphiZXIngQRCode,
78+ GoogleOTP;
79+
80+constructor Tf_dzOTP.Create(_Owner: TComponent);
81+begin
82+ inherited;
83+ CheckInput;
84+end;
85+
86+procedure Tf_dzOTP.b_GenerateSecretClick(Sender: TObject);
87+begin
88+ ed_SecretBase32.Text := GenerateOTPSecret();
89+end;
90+
91+procedure Tf_dzOTP.ed_CodeToCheckChange(Sender: TObject);
92+var
93+ Secret: TCaption;
94+ Token: Integer;
95+begin
96+ CheckInput;
97+ Secret := ed_SecretBase32.Text;
98+ if TryStrToInt(ed_CodeToCheck.Text, Token) and ValidateTOPT(Secret, Token) then begin
99+ l_CheckResult.Caption := 'OK';
100+ l_CheckResult.Font.Color := clLime;
101+ end else begin
102+ l_CheckResult.Caption := 'invalid';
103+ l_CheckResult.Font.Color := clRed;
104+ end;
105+end;
106+
107+procedure Tf_dzOTP.b_GenerateCodeClick(Sender: TObject);
108+var
109+ Secret: TCaption;
110+ Counter: Integer;
111+begin
112+ CheckInput;
113+ Secret := ed_SecretBase32.Text;
114+ if ed_Counter.Visible then
115+ Counter := StrToIntDef(ed_Counter.Text, -1)
116+ else
117+ Counter := -1;
118+ ed_Generated.Text := IntToStr(CalculateOTP(Secret, Counter));
119+end;
120+
121+procedure Tf_dzOTP.ed_IssuerChange(Sender: TObject);
122+begin
123+ CheckInput;
124+end;
125+
126+procedure Tf_dzOTP.ed_IdentityChange(Sender: TObject);
127+begin
128+ CheckInput;
129+end;
130+
131+procedure Tf_dzOTP.ed_PeriodOrCounterChange(Sender: TObject);
132+begin
133+ CheckInput;
134+end;
135+
136+procedure Tf_dzOTP.ed_SecretBase32Change(Sender: TObject);
137+begin
138+ if not FIsUpdating then
139+ ed_SecretPlain.Text := '';
140+ CheckInput;
141+end;
142+
143+procedure Tf_dzOTP.ed_SecretPlainChange(Sender: TObject);
144+begin
145+ CheckInput;
146+end;
147+
148+procedure Tf_dzOTP.rg_AlgorithmClick(Sender: TObject);
149+begin
150+ CheckInput;
151+end;
152+
153+procedure Tf_dzOTP.rg_DigitsClick(Sender: TObject);
154+begin
155+ CheckInput;
156+end;
157+
158+procedure Tf_dzOTP.rg_OtpTypeClick(Sender: TObject);
159+begin
160+ CheckInput;
161+end;
162+
163+procedure Tf_dzOTP.CheckInput;
164+var
165+ Identity: string;
166+ OtpType: string;
167+ PeriodOrCounter: Integer;
168+ SecretPlain: string;
169+ Base32: IBase32;
170+ Buf: TBytes;
171+ i: Integer;
172+ ch: WideChar;
173+ SecretBase32: string;
174+ Algorithm: string;
175+ Digits: string;
176+ URI: string;
177+ Issuer: string;
178+ PeriodOrCounterName: string;
179+ QrCode: TDelphiZXingQRCode;
180+ bmp: TBitmap;
181+ r: Integer;
182+ c: Integer;
183+ lbl: string;
184+begin
185+ if FIsUpdating then
186+ Exit; //==>
187+
188+ FIsUpdating := True;
189+ try
190+ Identity := ed_Identity.Text;
191+ if Identity = '' then
192+ Exit; //==>
193+ Issuer := ed_Issuer.Text;
194+ if rg_OtpType.ItemIndex = 0 then begin
195+ OtpType := 'totp';
196+ l_PeriodOrCounter.Caption := 'Period';
197+ PeriodOrCounterName := 'period';
198+ PeriodOrCounter := StrToIntDef(ed_PeriodOrCounter.Text, 30);
199+ l_Counter.Visible := False;
200+ ed_Counter.Visible := False;
201+ end else begin
202+ OtpType := 'hotp';
203+ l_PeriodOrCounter.Caption := 'Start Counter';
204+ PeriodOrCounter := StrToIntDef(ed_PeriodOrCounter.Text, 0);
205+ PeriodOrCounterName := 'counter';
206+ l_Counter.Visible := True;
207+ ed_Counter.Visible := True;
208+ end;
209+ Base32 := TBase32.Rfc4648;
210+ SecretPlain := ed_SecretPlain.Text;
211+ if SecretPlain <> '' then begin
212+ SetLength(Buf, 2 * Length(SecretPlain));
213+ for i := 1 to Length(SecretPlain) do begin
214+ ch := SecretPlain[i];
215+ Move(ch, Buf[(i - 1) * 2], 2);
216+ end;
217+ ed_SecretBase32.Text := Base32.Encode(Buf, False);
218+ end;
219+ SecretBase32 := ed_SecretBase32.Text;
220+ Buf := Base32.Decode(SecretBase32);
221+ case rg_Algorithm.ItemIndex of
222+ 1: Algorithm := 'SHA256';
223+ 2: Algorithm := 'SHA512';
224+ else
225+ Algorithm := 'SHA1';
226+ end;
227+ if rg_Digits.ItemIndex = 0 then
228+ Digits := '6'
229+ else
230+ Digits := '8';
231+ lbl := URIEncode(Identity);
232+ if Issuer <> '' then
233+ lbl := URIEncode(Issuer) + ':' + lbl;
234+ URI := Format('otpauth://%s/%s?secret=%s',
235+ [OtpType, lbl, SecretBase32]);
236+ if Issuer <> '' then
237+ URI := URI + '&issuer=' + URIEncode(Issuer);
238+ URI := URI + '&algorithm=' + Algorithm;
239+ URI := URI + '&digits=' + Digits;
240+ URI := URI + Format('&%s=%d', [PeriodOrCounterName, PeriodOrCounter]);
241+ ed_URI.Text := URI;
242+
243+ bmp := nil;
244+ QrCode := TDelphiZXingQRCode.Create;
245+ try
246+// QrCode.QuietZone := 20;
247+ QrCode.Data := URI;
248+ bmp := TBitmap.Create;
249+ bmp.SetSize(2 * QrCode.Rows, 2 * QrCode.Columns);
250+ for r := 0 to QrCode.Rows - 1 do begin
251+ for c := 0 to QrCode.Columns - 1 do begin
252+ if (QrCode.IsBlack[r, c]) then begin
253+ bmp.Canvas.Pixels[2 * c, 2 * r] := clBlack;
254+ bmp.Canvas.Pixels[2 * c + 1, 2 * r] := clBlack;
255+ bmp.Canvas.Pixels[2 * c + 1, 2 * r + 1] := clBlack;
256+ bmp.Canvas.Pixels[2 * c, 2 * r + 1] := clBlack;
257+ end else begin
258+ bmp.Canvas.Pixels[2 * c, 2 * r] := clWhite;
259+ bmp.Canvas.Pixels[2 * c + 1, 2 * r] := clWhite;
260+ bmp.Canvas.Pixels[2 * c + 1, 2 * r + 1] := clWhite;
261+ bmp.Canvas.Pixels[2 * c, 2 * r + 1] := clWhite;
262+ end;
263+ end;
264+ end;
265+ im_QrCode.Picture.Assign(bmp);
266+ finally
267+ FreeAndNil(bmp);
268+ FreeAndNil(QrCode);
269+ end;
270+ finally
271+ FIsUpdating := False;
272+ end;
273+end;
274+
275+end.
276+
Show on old repository browser