11
22
33
4+ <!DOCTYPE html>
5+
46< html >
57
68 < head >
9+ < meta charset =utf-8 >
710
8- < title > encrypt</ title >
11+ < title >
12+ Encrypt / Decrypt File Or Text
13+ </ title >
14+
15+ < meta name =description content ='encrypt or decrypt a file or text with password or rsa key '>
916
1017 < base href ='https://ext-code.com/utils/x509/encrypt/ '>
11- < base href ='https://javascript-2020.github.io/utils/x509/encrypt/ '>
18+ < link rel =canonical href ='https://ext-code.com/utils/x509/encrypt/encrypt.html '>
19+
20+ < link rel =icon type ='image/x-icon ' href ='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAMAAAAM7l6QAAABKVBMVEVHcEzSc2Dgd0/lpD/Nhl7hkkjorTbopzjihkvji0TptzXfcFPea1bhfkzosznllj/npDrYilbnsDrorjflmT/psjXmnzzmozvlqT7mnD7mozvnqjndYVfgeE/qsjThgUrprTTqsjXosDXjiUbmnD3ij0bklkHnnzzqrzXpqjbdYFneZlfeb1XjikXig0nprDbnnj3nqznlkj/kkUPlkEHnoDvqtjHqtTPpszLlkkHopTnoqzjqtjLbZ1bdZFfjhUffdE/kkUPjhkfnoTzllz/jjUXji0bprDblkUHjkULqsTTkkULkjULklD/opzfnmzznnTvfb1HcXVzdXVvkjkPifEvhe03mnjzqsjXquzPopTfquTDcjkvhfEzhf0vquDLqujHpqjbopDmLy+L0AAAAY3RSTlMAAjcSAQs4lDkmIZk4mRtHZAIWKpFVWTEGUkc/NZl6LYlaSH92IyqLppyYmBuXk6OjDnBUdX2VS42poyWkEk+jIpCKkZZjp4OXQq1svmSzx7JkQa23kVxCbl6qggWtfGWb3ctRuHp/AAABeklEQVQoz62TV3eCQBCFVwUEKwKCYC80e+/RqLHHkt7r//8RWR4QTYhP3pc5Z75zZ3fnngXgxPIdg9hLvRm3/QNLnP/DH48VOubY8YTVlQJJtk39VIJeNChaJWXWDDeakUdY6CIrm+F4JJaAxVbkL3zHcMUU+yNTARY05Z2Z7IOOFZ5rD16o8i2O/vEu7Hb7aMQwzGCQ6w8NHvBAORQ/ZbTQftTYxme3qyhf67ZgnOS26t4O7XBgWHCNlQIAEOP56wH21LsNTFXb39qmpVZyMtZwWMdIgILeoLDFOAosqyCaD+xj6G+q8NIbnpmDSg4lRARip47RYKLjEQR+KwEEoBM8T8Cm5epcz2lqD3KyzGy0ti+Hu7UnIa6z3XAbz7K82KpWRIDk3980H9LLGjmnarWU1JolcQCid/daHEhId5dYkhNXq+UlsbdhSzqkjyZTnFQuVw8w2GFdwySOW6FcUKHeTfYXzibd7nDYCZXJpNPXJonrsliQE3yoHxMyLW60QFkPAAAAAElFTkSuQmCC '>
21+ < meta name =viewport content ='width=device-width, initial-scale=1 '>
22+
23+ < script type ='application/ld+json '>
24+ {
25+ "@context" : "https://schema.org" ,
26+ "@type" : "SoftwareApplication" ,
27+ "name" : "Encrypt / Decrypt File Or Text" ,
28+ "url" : "https://ext-code.com/utils/x509/certificate-info/certificate-info.html" ,
29+ "author" : { "@type" :"Person" , "name" :"Matthew Richards" } ,
30+ "description" : "Encrypt or Decrypt a file or text using password or rsa private key" ,
31+ "applicationCategory" : "DeveloperApplication" ,
32+ "operatingSystem" : "All" ,
33+ "browserRequirements" : "Requires JavaScript-enabled browser" ,
34+ "softwareVersion" : "1.0.0" ,
35+ "offers" : { "@type" :"Offer" , "price" :"0" , "priceCurrency" :"GBP" }
36+ }
37+ </ script >
38+
1239
1340
1441
2956 var keydown ;
3057 var encrypt ;
3158
32-
59+ var hdrl
3360 var filemod ;
3461 var editor ;
3562 var log ;
4067 //:
4168
4269
43- mod . stack . add = init ;
44-
4570 async function init ( ) {
4671
4772 menu = menumod ( ) ;
4873 encrypt = encrypt ( ) ;
4974
50- filemod = mod . filemod ;
51- editor = mod . editor ;
52- log = mod . log ;
75+ hdr = mod [ 'x509-hdr' ] ;
76+ filemod = mod [ 'file-mod' ] ;
77+ editor = mod [ 'web-editor' ] ;
78+ log = mod [ 'log-mod' ] ;
5379
5480
5581 encrypt . initmod ( { ext} ) ;
5682
83+ hdr . initmod ( { ext, $, menu} ) ;
5784 filemod . initmod ( { ext, $, menu, menumod, complete, focus, source, editor, log} ) ;
5885 editor . initmod ( { ext, $, menu, menumod} ) ;
5986 log . initmod ( { ext, $} ) ;
6087
61-
62- await encrypt . init ( ) ;
63-
64- await filemod . init ( ) ;
65- await editor . init ( ) ;
66- await log . init ( ) ;
88+ await Promise . all ( [
89+ encrypt . init ( ) ,
90+ hdr . init ( ) ,
91+ filemod . init ( ) ,
92+ editor . init ( ) ,
93+ log . init ( ) ,
94+ ] ) ;
6795
6896
6997 menu . on . close = focus ;
7098
7199
72- await initdom ( document . body ) ;
100+ initdom ( document . body ) ;
73101
74102
75103 } //init
107135 font-family : arial;
108136 }
109137
110- # hdr
111- {}
138+ x509- hdr
139+ {margin-bottom : 20 px }
112140
113141 # encrypt-root
114142 {margin-bottom : 10px ;display : flex;gap : 10px }
157185 {border : 1px solid gray;border-radius : 3px ;box-sizing : border-box;width : 30px ;height : 30px ;cursor : pointer}
158186 .spc
159187 {flex : 1 }
188+
189+
190+ .visually-hidden
191+ {position : absolute !important ;width : 1px !important ;height : 1px !important ;padding : 0 !important ;margin : -1px !important ;overflow : hidden !important ;
192+ clip : rect (0 0 0 0 ) !important ;white-space : nowrap !important ;border : 0 !important }
193+
160194
161195 </ style >
162196
163197 </ head >
164198
165199 < body >
166200
201+
202+ < x509-hdr component =grp >
203+ < h1 class =visually-hidden >
204+ encrypt or decrypt a file or text
205+ </ h1 >
206+ < img class =title src ='images/encrypt-decrypt.png ' style ='top:-5px;height:90px '>
207+ < time slot =date datetime =2025-11-15 >
208+ 15 Nov 2025
209+ </ time >
210+ </ x509-hdr >
211+
212+ <!--
167213 <div>
168214 <h3>encrypt</h3>
169215 <div>
170216 note : encrypt before save
171217 </div>
172218 </div>
219+ -->
173220
174221 < div id =hdr >
175222
@@ -217,17 +264,17 @@ <h3>encrypt</h3>
217264
218265 </ div >
219266
220- < filemod component v2.0 > </ filemod >
267+ < file-mod component > </ file-mod >
221268
222269 </ div >
223270
224271 < div id =view >
225272
226- < editor component v2.0 > </ editor >
273+ < web- editor component > </ web- editor>
227274
228275 </ div >
229276
230- < log component v2.0 > </ log >
277+ < log-mod component > </ log-mod >
231278
232279 </ body >
233280
@@ -252,11 +299,11 @@ <h3>encrypt</h3>
252299 //:
253300
254301
255- async function initdom ( rootnode ) {
302+ function initdom ( rootnode ) {
256303
257304 var root = rootnode ;
258305
259- var hdr = $ ( root , '#hdr' ) ;
306+ hdr . initdom ( ) ;
260307
261308
262309 ui . password . root = $ ( root , '#password-root' ) ;
@@ -287,7 +334,7 @@ <h3>encrypt</h3>
287334 view = $ ( '#view' ) ;
288335
289336
290- await editor . initdom ( view , 'text' ) ;
337+ editor . initdom ( view , 'text' ) ;
291338
292339
293340
@@ -497,7 +544,7 @@ <h3>encrypt</h3>
497544
498545 fn . encrypt = async function ( key , txt ) {
499546
500- txt = encrypt . str_buf ( txt ) ;
547+ txt = encrypt . str_buf ( txt ) ;
501548
502549 var err ;
503550 try {
0 commit comments