Skip to content

Commit 6e10b42

Browse files
committed
ADD: Master key input dialog
1 parent 9732afd commit 6e10b42

2 files changed

Lines changed: 407 additions & 0 deletions

File tree

src/fmasterkey.lfm

Lines changed: 289 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,289 @@
1+
object frmMasterKey: TfrmMasterKey
2+
Left = 557
3+
Height = 494
4+
Top = 163
5+
Width = 480
6+
AutoSize = True
7+
BorderStyle = bsDialog
8+
Caption = 'Create Master Key'
9+
ChildSizing.LeftRightSpacing = 12
10+
ChildSizing.TopBottomSpacing = 12
11+
ClientHeight = 494
12+
ClientWidth = 480
13+
Constraints.MinWidth = 480
14+
Position = poMainFormCenter
15+
LCLVersion = '4.3.0.0'
16+
object gbMasterKey: TGroupBox
17+
AnchorSideLeft.Control = Owner
18+
AnchorSideTop.Control = lblText
19+
AnchorSideTop.Side = asrBottom
20+
AnchorSideRight.Control = Owner
21+
AnchorSideRight.Side = asrBottom
22+
Left = 12
23+
Height = 98
24+
Top = 41
25+
Width = 456
26+
Anchors = [akTop, akLeft, akRight]
27+
AutoSize = True
28+
BorderSpacing.Top = 12
29+
Caption = 'Master key'
30+
ChildSizing.LeftRightSpacing = 12
31+
ChildSizing.TopBottomSpacing = 10
32+
ChildSizing.VerticalSpacing = 6
33+
ChildSizing.EnlargeHorizontal = crsScaleChilds
34+
ChildSizing.Layout = cclLeftToRightThenTopToBottom
35+
ChildSizing.ControlsPerLine = 2
36+
ClientHeight = 76
37+
ClientWidth = 452
38+
TabOrder = 0
39+
object lblPassword: TLabel
40+
AnchorSideTop.Side = asrCenter
41+
Left = 12
42+
Height = 25
43+
Top = 10
44+
Width = 243
45+
Caption = '&Master password:'
46+
end
47+
object edtPassword: TEdit
48+
Left = 255
49+
Height = 25
50+
Top = 10
51+
Width = 185
52+
EchoMode = emPassword
53+
PasswordChar = '*'
54+
TabOrder = 0
55+
OnChange = edtPasswordChange
56+
end
57+
object lblRepeat: TLabel
58+
Left = 12
59+
Height = 25
60+
Top = 41
61+
Width = 243
62+
Caption = '&Repeat password:'
63+
end
64+
object edtRepeat: TEdit
65+
Left = 255
66+
Height = 25
67+
Top = 41
68+
Width = 185
69+
EchoMode = emPassword
70+
PasswordChar = '*'
71+
TabOrder = 1
72+
OnChange = edtPasswordChange
73+
end
74+
end
75+
object gbKeyTransform: TGroupBox
76+
AnchorSideLeft.Control = gbMasterKey
77+
AnchorSideTop.Control = gbMasterKey
78+
AnchorSideTop.Side = asrBottom
79+
AnchorSideRight.Control = Owner
80+
AnchorSideRight.Side = asrBottom
81+
Left = 12
82+
Height = 291
83+
Top = 139
84+
Width = 456
85+
Anchors = [akTop, akLeft, akRight]
86+
AutoSize = True
87+
Caption = 'Key transformation'
88+
ChildSizing.LeftRightSpacing = 12
89+
ChildSizing.TopBottomSpacing = 12
90+
ClientHeight = 269
91+
ClientWidth = 452
92+
TabOrder = 1
93+
object lblHeader: TLabel
94+
AnchorSideLeft.Control = gbKeyTransform
95+
AnchorSideTop.Control = gbKeyTransform
96+
AnchorSideRight.Control = gbKeyTransform
97+
AnchorSideRight.Side = asrBottom
98+
Left = 12
99+
Height = 34
100+
Top = 12
101+
Width = 428
102+
Anchors = [akTop, akLeft, akRight]
103+
Caption = 'The master key is transformed using a key derivation function. This adds a work factor and makes dictionary and guessing attacks harder.'
104+
WordWrap = True
105+
end
106+
object pnlKeyTransform: TPanel
107+
AnchorSideLeft.Control = gbKeyTransform
108+
AnchorSideTop.Control = lblHeader
109+
AnchorSideTop.Side = asrBottom
110+
AnchorSideRight.Control = gbKeyTransform
111+
AnchorSideRight.Side = asrBottom
112+
Left = 12
113+
Height = 160
114+
Top = 46
115+
Width = 428
116+
Anchors = [akTop, akLeft, akRight]
117+
AutoSize = True
118+
BevelOuter = bvNone
119+
ChildSizing.TopBottomSpacing = 12
120+
ChildSizing.HorizontalSpacing = 48
121+
ChildSizing.VerticalSpacing = 12
122+
ChildSizing.EnlargeHorizontal = crsScaleChilds
123+
ChildSizing.Layout = cclLeftToRightThenTopToBottom
124+
ChildSizing.ControlsPerLine = 2
125+
ClientHeight = 160
126+
ClientWidth = 428
127+
TabOrder = 0
128+
object lblFunction: TLabel
129+
Left = 0
130+
Height = 25
131+
Top = 12
132+
Width = 219
133+
Caption = '&Key derivation function:'
134+
end
135+
object cmbFunction: TComboBox
136+
Left = 267
137+
Height = 25
138+
Top = 12
139+
Width = 161
140+
ItemHeight = 17
141+
ItemIndex = 0
142+
Items.Strings = (
143+
'Argon2d'
144+
'Argon2id'
145+
)
146+
Style = csDropDownList
147+
TabOrder = 0
148+
Text = 'Argon2d'
149+
end
150+
object lblIterations: TLabel
151+
Left = 0
152+
Height = 25
153+
Top = 49
154+
Width = 219
155+
Caption = '&Iterations:'
156+
end
157+
object seIterations: TSpinEdit
158+
Left = 267
159+
Height = 25
160+
Top = 49
161+
Width = 161
162+
MaxValue = 64
163+
MinValue = 2
164+
TabOrder = 1
165+
Value = 4
166+
end
167+
object lblMemory: TLabel
168+
Left = 0
169+
Height = 25
170+
Top = 86
171+
Width = 219
172+
Caption = '&Memory:'
173+
end
174+
object pnlMemory: TPanel
175+
Left = 267
176+
Height = 25
177+
Top = 86
178+
Width = 161
179+
AutoSize = True
180+
BevelOuter = bvNone
181+
ClientHeight = 25
182+
ClientWidth = 161
183+
TabOrder = 2
184+
object seMemory: TSpinEdit
185+
Left = 0
186+
Height = 25
187+
Top = 0
188+
Width = 65
189+
MaxValue = 1024
190+
MinValue = 64
191+
TabOrder = 0
192+
Value = 64
193+
end
194+
object lblUnit: TLabel
195+
AnchorSideLeft.Control = seMemory
196+
AnchorSideLeft.Side = asrBottom
197+
AnchorSideTop.Control = seMemory
198+
AnchorSideBottom.Control = seMemory
199+
AnchorSideBottom.Side = asrBottom
200+
Left = 73
201+
Height = 25
202+
Top = 0
203+
Width = 19
204+
Anchors = [akTop, akLeft, akBottom]
205+
BorderSpacing.Left = 8
206+
Caption = 'MB'
207+
Layout = tlCenter
208+
end
209+
end
210+
object lblParallelism: TLabel
211+
Left = 0
212+
Height = 25
213+
Top = 123
214+
Width = 219
215+
Caption = '&Parallelism:'
216+
end
217+
object seParallelism: TSpinEdit
218+
Left = 267
219+
Height = 25
220+
Top = 123
221+
Width = 161
222+
MaxValue = 64
223+
MinValue = 2
224+
TabOrder = 3
225+
Value = 2
226+
end
227+
end
228+
object lblFooter: TLabel
229+
AnchorSideLeft.Control = gbKeyTransform
230+
AnchorSideTop.Control = pnlKeyTransform
231+
AnchorSideTop.Side = asrBottom
232+
AnchorSideRight.Control = btnTest
233+
Left = 12
234+
Height = 51
235+
Top = 206
236+
Width = 335
237+
Anchors = [akTop, akLeft, akRight]
238+
BorderSpacing.Right = 18
239+
Caption = 'The more iterations, the harder are dictionary and guessing attacks, but also password store loading/saving takes more time.'
240+
WordWrap = True
241+
end
242+
object btnTest: TButton
243+
AnchorSideTop.Control = pnlKeyTransform
244+
AnchorSideTop.Side = asrBottom
245+
AnchorSideRight.Control = gbKeyTransform
246+
AnchorSideRight.Side = asrBottom
247+
Left = 365
248+
Height = 25
249+
Top = 206
250+
Width = 75
251+
Anchors = [akTop, akRight]
252+
Caption = 'Test'
253+
TabOrder = 1
254+
OnClick = btnTestClick
255+
end
256+
end
257+
object lblText: TLabel
258+
AnchorSideLeft.Control = Owner
259+
AnchorSideTop.Control = Owner
260+
Left = 12
261+
Height = 17
262+
Top = 12
263+
Width = 441
264+
Caption = 'Specify a new master key, which will be used to encrypt the password store.'
265+
end
266+
object pnlButtons: TButtonPanel
267+
AnchorSideTop.Control = gbKeyTransform
268+
AnchorSideTop.Side = asrBottom
269+
Left = 12
270+
Height = 27
271+
Top = 454
272+
Width = 456
273+
Align = alNone
274+
Anchors = [akTop, akLeft, akRight]
275+
BorderSpacing.Top = 18
276+
OKButton.Name = 'OKButton'
277+
OKButton.DefaultCaption = True
278+
OKButton.Enabled = False
279+
HelpButton.Name = 'HelpButton'
280+
HelpButton.DefaultCaption = True
281+
CloseButton.Name = 'CloseButton'
282+
CloseButton.DefaultCaption = True
283+
CancelButton.Name = 'CancelButton'
284+
CancelButton.DefaultCaption = True
285+
TabOrder = 2
286+
ShowButtons = [pbOK, pbCancel]
287+
ShowBevel = False
288+
end
289+
end

0 commit comments

Comments
 (0)