-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
1828 lines (1732 loc) · 85.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<html>
<head>
<link rel="icon" href="icon.jpg">
<meta charset="utf-8">
<title>SCP-1024,RSA HYBRID</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<meta name="subject" content="">
<meta name="description" content="">
<Meta name="Classification" content="">
<Meta name="rating" content="">
<meta name="category" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="robots" content="index, follow">
<meta http-equiv="content-type" content="text/html;UTF-8">
<meta http-equiv="content-language" content="en">
<meta http-equiv="revisit-after" content="">
<meta http-equiv='cache-control' content='no-cache'>
<meta http-equiv='expires' content='0'>
<meta http-equiv='pragma' content='no-cache'>
<link rel="shortcut icon" href="icon.jpg">
<script src="js/crypto-js.min.js"></script>
<script src="js/jsencrypt.min.js"></script>
<script src="js/SilverCipherMini.min.js"></script>
<!-- <script src="sc5.js"></script> -->
<script src="js/sc5.min.js"></script>
<!--<script src="sc5scheme.js"></script>-->
<!--CSS-->
<style>
.container {
margin: 0 auto; /* divleri sayfada ortalamak için */
opacity:0.9;
}
body {
/*
background: white url("images/pexels-mnm-zameer-3308588.jpg") no-repeat center / cover;
background-repeat: no-repeat;
background-attachment: fixed;
*/
background: #f0f0f0;
}
.a1 {
white-space: break-word; /* divin içindeki elementlerin alt satıra geçmesini engelle */
}
textarea {
min-width: 300px;
width: 92%; /* sabit bir genişlik */
max-width: 644px; /* sabit bir genişlik */
height: 150px;
border: none; /* kenarlığı kaldır */
outline: none;
padding: 10px;
font-size: 18px;
font-family: Roboto, sans-serif;
resize: none;
background: #f0f0f0; /* arkaplan rengini açık gri yap */
color: #333333; /* yazı rengini koyu gri yap */
margin: 10px auto; /* divleri sayfada ortalamak için */
display: block; /* textarea'yı blok element yap */
/*box-shadow: inset 0 -1px 0 #92979B, inset 0 1px 0 #92979B;*/ /* içe doğru 1px kalınlığında gri bir çizgi hem altta hem üstte olsun */
box-shadow: inset 0 -1px 0 #92979B, inset 0 1px 0 #92979B, inset -1px 0 0 #92979B, inset 1px 0 0 #92979B; /* içe doğru 1px kalınlığında gri bir çizgi her yönde olsun */
}
input {
min-width: 300px;
width: 100%; /* sabit bir genişlik */
max-width: 640px; /* sabit bir genişlik */
height: 50px; /* istediğiniz yükseklik */
border: none; /* kenarlığı kaldır */
outline: none;
padding: 10px;
font-size: 18px;
font-family: Roboto, sans-serif;
resize: none;
box-shadow: none; /* gölgeyi kaldır */
background: #f0f0f0; /* arkaplan rengini açık gri yap */
color: #333333; /* yazı rengini koyu gri yap */
margin: 10px auto; /* divleri sayfada ortalamak için */
display: block; /* input'u blok element yap */
box-shadow: inset 0 -1px 0 #92979B; /* içe doğru 1px kalınlığında gri bir çizgi olsun */
}
h1 {
min-width: 100px;
width:96%;
max-width: 620px; /* sabit bir genişlik */
font-size: 36px;
font-family: Roboto, sans-serif;
font-weight: bold;
text-align: center;
/*text-transform: uppercase;*/
color: #F4A15D;
text-shadow: none; /* gölgeyi kaldır */
background: #f0f0f0; /* arkaplan rengini açık gri yap */
border-radius: 8px;
box-shadow:none; /* gölgeyi kaldır */
margin: 0 auto; /* h1'i sayfada ortalamak için */
display: block; /* h1'i blok element yap */
padding-top:10px;
padding-bottom:10px;
}
button {
min-width: 100px;
height: 80px;
border: none; /* kenarlığı kaldır */
outline: none;
font-size: 20px;
font-family: Roboto, sans-serif;
box-shadow: none; /* gölgeyi kaldır */
background: #f0f0f0; /* arkaplan rengini açık gri yap */
color: #333333; /* yazı rengini koyu gri yap */
margin: 0 auto; /* divleri sayfada ortalamak için */
display: inline-block; /* textarea'yı blok element yap */
transition: all 0.3s; /* düzgün bir geçiş için */
white-space: nowrap; /* alt satıra kaymayı engelle */
}
button:hover {
transform: scale(1.05); /* üzerine gelince büyüsün */
opacity: 0.9; /* biraz soluklaşsın */
}
button:active {
transform: scale(0.95); /* tıklayınca küçülsün */
box-shadow: inset 0 2px 4px rgba(0,0,0,0.2); /* içe doğru bir gölge olsun */
}
p {
min-width: 100px;
width:96%;
max-width: 620px; /* sabit bir genişlik */
font-size: 28px;
font-family: Roboto, sans-serif; /* Roboto yazı tipi */
font-weight: bold;
text-align: center;
/*text-transform: uppercase;*/
color: #333333; /* yazı rengini koyu gri yap */
text-shadow: none; /* gölgeyi kaldır */
padding: 10px;
box-shadow: none; /* gölgeyi kaldır */
display: block; /* p'yi blok element yap */
margin:0 auto;
}
/* dosya seçme butonunu gizle */
input[type="file"]::file-selector-button {
display: none;
}
/* dosya seçme butonunun yerine istediğiniz yazıyı ekle */
input[type="file"]::after {
content: " Ayarları yükle"; /* istediğiniz yazı */
display: inline-block;
padding: 8px 12px;
cursor: pointer;
border: 1px solid #ddd;
border-radius: 4px;
}
/* a elementinin stilini belirle */
a {
/* metin rengini beyaz yap */
color: white;
/* arka plan rengini koyu gri yap */
background-color: #333;
/* kenar boşluklarını ayarla */
padding: 8px 12px;
/* kenar yuvarlaklığını ayarla */
border-radius: 4px;
/* metin dekorasyonunu kaldır */
text-decoration: none;
}
/* a elementinin üzerine gelindiğinde stilini belirle */
a:hover {
/* arka plan rengini açık gri yap */
background-color: #555;
}
/* seçim elementinin kenarlığı ve arka plan rengi */
select {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
min-width: 300px;
width: 100%;
max-width: 644px;
height: 50px;
border: none; /* kenarlığı kaldır */
font-size: 24px;
background-color: #f0f0f0; /* arka plan rengini açık gri yap */
position: relative; /* pozisyonu göreli yap */
}
/* seçim elementinin üzerine geldiğinde veya tıkladığında arka plan rengi ve kenarlığı */
select:hover {
background-color: #e0e0e0; /* daha açık gri arka plan */
}
select:focus {
border-color: none; /* kenarlık rengini kaldır */
}
/* seçim elementinin sağ tarafına bir ok simgesi eklemek */
select::after {
content: "▼"; /* ok karakteri */
position: absolute; /* pozisyonu mutlak yap */
right: 10px; /* sağa hizala */
top: 50%; /* ortala */
transform: translateY(-50%); /* ortala */
color: #333333; /* yazı rengini koyu gri yap */
}
/* seçeneklerin yazı tipi, yazı boyutu ve yazı rengi */
option {
font-family: Roboto, sans-serif; /* Roboto yazı tipi */
font-size: 18px; /* 18px yazı boyutu */
color: #333333; /* koyu gri yazı rengi */
}
/* seçilen seçeneğin arka plan rengi ve yazı rengi */
option:checked {
background-color: #f0f0f0; /* arka plan rengini açık gri yap */
color: #333333; /* yazı rengini koyu gri yap */
}
</style>
<!--CSS END-->
</head>
<body>
<div id="loading" style="position: fixed; top: 0; width: 100%;background-color:floralwhite;opacity:1;z-index:10;display:none;">
<p style="font-size:32px;" id="loadingdurum">Loading...</p>
</div>
<div id="main" class="a1">
<h1 class="container" style="border:none!important;box-shadow:none!important;background:transparent!important;">SCP-1024 RSA Hybrid Encryption</h1>
<input type="password" id="ortak" class="container" style="margin-bottom:10px;" placeholder="🔑 Symmetric Key" autocomplete="off">
<div style="text-align: center; display: flex; justify-content: center;max-width:620px;margin:0 auto;width: 92% !important;">
<button onclick="kopyalax()" type="button" style=" margin-bottom:10px; flex: 1;border-top-left-radius: 15px;border-bottom-left-radius: 15px;">Copy</button>
<button onclick="yapistirx()" type="button" style=" margin-bottom:10px; flex: 1;">Paste</button>
<button onclick="clearx()" type="button" style=" margin-bottom:10px; flex: 1;">Clear</button>
<button onclick="randomx()" type="button" style=" margin-bottom:10px; flex: 1;border-top-right-radius: 15px;border-bottom-right-radius: 15px;">Random</button>
</div>
<div style="text-align: center;overflow: none!important;">
<select id="rsamode" name="rsamode" size="1" style="min-width: 300px;width: 100%;max-width: 644px;">
<option value="1" style="color:green;">Hybrid RSA,SCP/SCM,FLEX (Fast)</option>
<option value="2" style="color:gray;">Hybrid RSA,SCP/SCM,MIX (Slow)</option>
<option value="3" style="color:green;">Hybrid RSA,AES,FLEX (Fast)</option>
<option value="4" style="color:gray;">Hybrid RSA,AES,MIX (Slow)</option>
<option value="5" style="color:green;">Asymmetric RSA-FLEX (Fast)</option>
<option value="6" style="color:gray;">Asymmetric RSA-MIX (Slow)</option>
<option value="7" style="color:gray;">Symmetric SCP/SCM,AES (Fast)</option>
<option value="8" selected style="color:green;">Symmetric SCP/SCM (Fast)</option>
<option value="9" style="color:gray;">Symmetric AES (Fast)</option>
</select>
</div>
<div style="text-align: center;overflow: none!important;">
<select id="scmode" name="scmode" size="1" style="min-width: 300px;width: 100%;max-width: 644px;">
<option value="1" style="color:gray;">SCM (Fast)</option>
<option value="2" selected style="color:green;">SCP (Top Security)(Beta)</option>
</select>
</div>
<div style="text-align: center;overflow: none!important;">
<select id="scpaddround" name="scmode" size="1" style="min-width: 300px;width: 100%;max-width: 644px;">
<option value="0" selected style="color:gray;">SCP Normal</option>
<option value="2" style="color:green;">SCP 2x</option>
<option value="4" style="color:green;">SCP 4x</option>
<option value="8" style="color:green;">SCP 8x</option>
<option value="16" style="color:green;">SCP 16x</option>
<option value="24" style="color:green;">SCP 24x</option>
<option value="35" style="color:green;">SCP 35x</option>
<option value="50" style="color:rgb(218, 141, 0);">SCP 50x</option>
<option value="75" style="color:rgb(218, 141, 0);">SCP 75x</option>
<option value="100" style="color:red;">SCP 100x</option>
<option value="200" style="color:red;">SCP 200x</option>
<option value="400" style="color:red;">SCP 400x</option>
<option value="500" style="color:darkred;">SCP 500x</option>
<option value="1000" style="color:darkred;">SCP 1000x</option>
<option value="2000" style="color:darkred;">SCP 2000x</option>
<option value="5000" style="color:darkred;">SCP 5000x</option>
</select>
</div>
<div style="text-align: center;overflow: none!important;">
<select id="scdatamode" name="scdatamode" size="1" style="min-width: 300px;width: 100%;max-width: 644px;">
<option value="0" style="color:rgb(218, 141, 0);">File Mode Xor</option>
<option value="1" selected style="color:green;">File Mode SCP-0</option>
</select>
</div>
<div style="text-align: center;overflow: none!important;">
<select id="scblock" name="scblock" size="1" style="min-width: 300px;width: 100%;max-width: 644px;">
<option value="0" selected style="color:rgb(218, 141, 0);">SCP No Block</option>
<option value="128" style="color:green;">SCP 1024 Bit Block</option>
<option value="256" style="color:gray;">SCP 2048 Bit Block</option>
</select>
</div>
<br>
<!-- //////////////////// -->
<div style="text-align: center; display:flex; justify-content: center;margin:0 auto; flex-wrap: wrap;justify-content: center;margin:0 auto;width: 92% !important;">
<div style="flex: 1;">
<div style="text-align: center;">
<button type="button" style="width: 100% !important;font-size:28px;border-radius:15px;"><input type="file" id="encryptfilex" style="display:none;"><label for="encryptfilex">🔒Encrypt File</label></button>
</div>
</div>
<div style="flex: 1;">
<div style="text-align: center;">
<button type="button" style="width: 100% !important;max-width: 620px;font-size:28px;border-radius:15px;"><input type="file" id="decryptfilex" style="display:none;"><label for="decryptfilex">🔓Decrypt File</label></button>
</div>
</div>
</div>
<div style="text-align: center; display:flex; justify-content: center;margin:0 auto; flex-wrap: wrap;">
<div style="flex: 1;">
<div style="text-align: center;">
<button type="button" style="width: 100% !important;max-width: 620px;font-size:28px;border-radius:15px;"><input type="file" id="encryptfile" style="display:none;"><label for="encryptfile">↓↓ Load File ↓↓</label></button>
</div>
<h1 class="container" style="border-radius:0;border-top-left-radius: 15px;border-top-right-radius: 15px;margin-top:5px!important;">Decrypt / Verify</h1>
<textarea spellcheck="false" id="arkadasinin_sifreli_mesaji" class="container" style="border-radius: 15px;margin-bottom:10px;" autocomplete="off" placeholder="Encrypted Message..."></textarea>
<div style="text-align: center;"><button id="decryptbtn" type="button" style="border-radius:0;border-bottom-left-radius: 15px!important;border-bottom-right-radius: 15px!important;margin-bottom:10px;min-width: 300px;width: 100%;max-width: 644px;font-size:22px;" onclick="friend_decrypt_encrypted_message()">🔓 Read the message</button></div>
<div style="text-align: center; display: flex; justify-content: center;max-width:620px;margin:0 auto;width: 92% !important;">
<button onclick="kopyala0()" type="button" style=" margin-bottom:10px; flex: 1;border-top-left-radius: 15px;border-bottom-left-radius: 15px;">Copy</button>
<button onclick="yapistir0()" type="button" style=" margin-bottom:10px; flex: 1;">Paste</button>
<button onclick="clear0()" type="button" style=" margin-bottom:10px; flex: 1;">Clear</button>
<button onclick="download_dec_messages()" type="button" style=" margin-bottom:10px; flex: 1;border-top-right-radius: 15px;border-bottom-right-radius: 15px;">Download</button>
</div>
</div><!-- //////////////////// --><div style="flex: 1;">
<div style="text-align: center;">
<button onclick="download_enc_messages()" type="button" style="
width: 100% !important;max-width: 620px;font-size:28px;border-radius:15px;
">↓↓ Download File ↓↓</button>
</div>
<h1 class="container" style="border-radius:0;border-top-left-radius: 15px;border-top-right-radius: 15px;margin-top:5px!important;">Encrypt / Sign</h1>
<textarea spellcheck="false" id="sifrelenecek_rsa_mesaji" class="container" style="border-radius: 15px;margin-bottom:10px;" autocomplete="off" placeholder="Message to Encrypt..."></textarea>
<div style="text-align: center;"><button id="encryptbtn" type="button" style="border-radius:0;border-bottom-left-radius: 15px!important;border-bottom-right-radius: 15px!important;margin-bottom:10px;min-width: 300px;width: 100%;max-width: 644px;font-size:22px;" onclick="friend_sent_encrypted_message()">🔒 Encrypt Message</button></div>
<div style="text-align: center; display: flex; justify-content: center;max-width:620px;margin:0 auto;width: 92% !important;">
<button onclick="kopyala1()" type="button" style=" margin-bottom:10px; flex: 1;border-top-left-radius: 15px;border-bottom-left-radius: 15px;">Copy</button>
<button onclick="yapistir1()" type="button" style=" margin-bottom:10px; flex: 1;">Paste</button>
<button onclick="clear1()" type="button" style=" margin-bottom:10px; flex: 1;">Clear</button>
<button type="button" style=" margin-bottom:10px; flex: 1;border-top-right-radius: 15px;border-bottom-right-radius: 15px;"><input type="file" id="decryptfile" style="display:none;"><label for="decryptfile">Load File</label></button>
</div>
</div>
</div>
<!-- //////////////////// -->
<h1 class="container" style="border:none!important;box-shadow:none!important;background:transparent!important;">Load Config File</h1>
<input type="password" id="config_shield" class="container" style="margin-bottom:10px;" placeholder="🔑 Config File Protection Key" autocomplete="off">
<div style="text-align: center;">
<button onclick="conf_download()" type="button" style="margin-bottom:10px;padding-left:10px;padding-right: 10px;border-radius:15px;">Download Config</button>
<button type="button" style="margin-bottom:10px;padding-left:10px;padding-right: 10px;border-radius:15px;"><input type="file" id="dosya" accept="application/json" style="display:none;"><label for="dosya">Load Config</label></button>
</div>
<div style="text-align: center;">
<button type="button" style="
width: 100% !important;max-width: 620px;font-size:28px;border-radius:15px;
"><input type="file" id="target_public_key_file" style="display:none;"><label for="target_public_key_file">↓↓ Load File ↓↓</label></button>
</div>
<h1 class="container" style="border-top-left-radius: 15px;border-top-right-radius: 15px;margin-top:5px!important;">Friend's public key</h1>
<textarea spellcheck="false" style="border-radius: 15px;margin-bottom:10px;" class="container" id="target_public_key" autocomplete="off" placeholder="🔑 Friend's Public Key..."></textarea>
<div style="text-align: center; display: flex; justify-content: center;max-width:620px;margin:0 auto;width: 92% !important;">
<button onclick="kopyala2()" type="button" style=" margin-bottom:10px; flex: 1;border-top-left-radius: 15px;border-bottom-left-radius: 15px;">Copy</button>
<button onclick="yapistir2()" type="button" style=" margin-bottom:10px; flex: 1;">Paste</button>
<button onclick="clear2()" type="button" style=" margin-bottom:10px; flex: 1;">Clear</button>
<button onclick="inject2()" type="button" style=" margin-bottom:10px; flex: 1;border-top-right-radius: 15px;border-bottom-right-radius: 15px;font-size: 14px;">INJECT-PEM</button>
</div>
<div style="text-align: center;">
<button onclick="download_target_public_key()" type="button" style="
width: 100% !important;max-width: 620px;font-size:28px;border-radius:15px;
">↑↑ Download File ↑↑</button>
</div>
<br>
<!-- ZZZZZZZZZZZZZZZZZZZZ -->
<div style="text-align: center; display:flex; justify-content: center;margin:0 auto; flex-wrap: wrap;">
<div style="flex: 1;">
<div style="text-align: center;">
<button type="button" style="
width: 100% !important;max-width: 620px;font-size:28px;border-radius:15px;
"><input type="file" id="bizim_public_keyimiz_file" style="display:none;"><label for="bizim_public_keyimiz_file">↓↓ Load File ↓↓</label></button>
</div>
<h1 style="border-top-left-radius: 15px;border-top-right-radius: 15px;margin-top:5px!important;" class="container">Your public key</h1>
<textarea id="bizim_public_keyimiz" spellcheck="false" style="border-radius: 15px;margin-bottom:10px;" class="container" autocomplete="off" placeholder="🔑 Your Public Key..."></textarea>
<div style="text-align: center; display: flex; justify-content: center;max-width:620px;margin:0 auto;width: 92% !important;">
<button onclick="kopyala3()" type="button" style=" margin-bottom:10px; flex: 1;border-top-left-radius: 15px;border-bottom-left-radius: 15px;">Copy</button>
<button onclick="yapistir3()" type="button" style=" margin-bottom:10px; flex: 1;">Paste</button>
<button onclick="clear3()" type="button" style=" margin-bottom:10px; flex: 1;">Clear</button>
<button onclick="inject3()" type="button" style=" margin-bottom:10px; flex: 1;border-top-right-radius: 15px;border-bottom-right-radius: 15px;font-size: 14px;">INJECT-PEM</button>
</div>
<div style="text-align: center;">
<button onclick="download_bizim_public_keyimiz()" type="button" style="
width: 100% !important;max-width: 620px;font-size:28px;border-radius:15px;
">↑↑ Download File ↑↑</button>
</div>
</div><!-- ZZZZZZZZZZZZZZZZZZZZ --><div style="flex: 1;">
<div style="text-align: center;">
<button type="button" style="
width: 100% !important;max-width: 620px;font-size:28px;border-radius:15px;
"><input type="file" id="bizim_private_keyimiz_file" style="display:none;"><label for="bizim_private_keyimiz_file">↓↓ Load File ↓↓</label></button>
</div>
<h1 style="border-top-left-radius: 15px;border-top-right-radius: 15px;margin-top:5px!important;" class="container">Your private key</h1>
<textarea id="bizim_private_keyimiz" spellcheck="false" class="container" style="border-radius: 15px;margin-bottom:10px;" autocomplete="off" placeholder="🔑 Your Private Key..."></textarea>
<div style="text-align: center; display: flex; justify-content: center;max-width:620px;margin:0 auto;width: 92% !important;">
<button onclick="kopyala4()" type="button" style=" margin-bottom:10px; flex: 1;border-top-left-radius: 15px;border-bottom-left-radius: 15px;">Copy</button>
<button onclick="yapistir4()" type="button" style=" margin-bottom:10px; flex: 1;">Paste</button>
<button onclick="clear4()" type="button" style=" margin-bottom:10px; flex: 1;">Clear</button>
<button onclick="inject4()" type="button" style=" margin-bottom:10px; flex: 1;border-top-right-radius: 15px;border-bottom-right-radius: 15px;font-size: 14px;">INJECT-PEM</button>
</div>
<div style="text-align: center;">
<button onclick="download_bizim_private_keyimiz()" type="button" style="
width: 100% !important;max-width: 620px;font-size:28px;border-radius:15px;
">↑↑ Download File ↑↑</button>
</div>
</div>
</div>
<!-- ZZZZZZZZZZZZZZZZZZZZ -->
<!--
<br>
<h1 class="container" style="border:none!important;box-shadow:none!important;background:transparent!important;">Change password</h1>
<input type="password" id="passchange" class="container" style="margin-bottom:10px;" placeholder="🔑 New Symmetric Key" autocomplete="off">
<div style="text-align: center;">
<button onclick="passchange()" type="button" style="border-radius:15px;font-size:28px;">Change Password</button>
</div>
-->
<br>
<h1 class="container" style="border:none!important;box-shadow:none!important;background:transparent!important;">RSA Key Generator</h1>
<!-- V -->
<div style="text-align: center; display:flex; justify-content: center;margin:0 auto; flex-wrap: wrap;">
<div style="text-align: center;">
<button id="btn2048" onclick="key_gen_main(2048);" type="button" style="flex: 1;margin-bottom:10px;width: 96% !important;max-width: 620px;font-size:24px;border-radius:15px;">2048 Bit / (2s)</button>
</div>
<div style="text-align: center;">
<button id="btn3072" onclick="key_gen_main(3072)" type="button" style="flex: 1;margin-bottom:10px;width: 96% !important;max-width: 620px;font-size:24px;border-radius:15px;">3072 Bit / (13s)</button>
</div>
<div style="text-align: center;">
<button id="btn4096" onclick="key_gen_main(4096)" type="button" style="flex: 1;margin-bottom:10px;width: 96% !important;max-width: 620px;font-size:24px;border-radius:15px;">4096 Bit / (45s)</button>
</div>
<div style="text-align: center;">
<button id="btn5000" onclick="key_gen_main(5000)" type="button" style="flex: 1;margin-bottom:10px;width: 96% !important;max-width: 620px;font-size:24px;border-radius:15px;">5000 Bit / (2m)</button>
</div>
<div style="text-align: center;">
<button id="btn8192" onclick="key_gen_main(8192)" type="button" style="flex: 1;margin-bottom:10px;width: 96% !important;max-width: 620px;font-size:24px;border-radius:15px;">8192 Bit / (3h)</button>
</div>
<div style="text-align: center;">
<button id="btn16384" onclick="key_gen_main(16384)" type="button" style="flex: 1;width: 96% !important;max-width: 620px;font-size:24px;border-radius:15px;">16384 Bit / (1d)</button>
</div>
</div>
<!--
<div style="text-align: center;max-width:620px;margin:0 auto;width: 92% !important;">
<h1 class="container" style="border:none!important;box-shadow:none!important;background:transparent!important;">Test SCP-1 Military Level Encryption Algorithm</h1>
<input type="text" id="testtext" value="" class="container" style="margin-bottom:10px;" placeholder="Plain Text" autocomplete="off">
<input type="text" id="testkey" value="123" class="container" style="margin-bottom:10px;" placeholder="Key" autocomplete="off">
<button onclick="testencrypt()" style="height:40px;">Test</button>
<textarea id="testoutput" style="width:100%!important;height:56px;border: none !important;box-shadow:none!important;"></textarea>
</div>
<textarea id="adsadasdas" style="width:92%!important;max-width:100%!important;height:700px!important;border-radius: 15px;box-shadow:none;box-shadow: inset 0 -1px 0 #92979B !important;"></textarea>
-->
<script>
// function base64_encode(array) {
// var base64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
// var result = '';
// var i, j, triplet;
// for (i = 0; i < array.length; i += 3) {
// triplet = (array[i] << 16) | (array[i + 1] << 8) | array[i + 2];
// for (j = 0; j < 4; j += 1) {
// if (i * 8 + j * 6 <= array.length * 8) {
// result += base64.charAt((triplet >> 18 - j * 6) & 0x3F);
// } else {
// result += '==';
// }
// }
// }
// return result.replace(/=*$/, '')+"==";
// //return result;
// }
// function testencrypt(){
// var inputx1 = document.getElementById("testtext");
// var inputkey = document.getElementById("testkey");
// testencryptscheme(inputx1.value,inputkey.value);
// }
// function testencryptscheme(data,key){
// var cipher = new SC5Scheme(key);
// var textarea = document.getElementById("adsadasdas");
// textarea.value="";
// var testoutput = document.getElementById("testoutput");
// testoutput.value="Output : "+cipher.Encrypt(data);
// schemeList=cipher.getScheme();
// // for döngüsü ile liste içindeki sözlükleri textarea değerine yazdır
// for (let i = 0; i < schemeList.length; i++) {
// // i. sözlüğü al
// let scheme = schemeList[i];
// // sözlüğün anahtarlarını al
// let keys = Object.keys(scheme);
// // her anahtar için
// for (let key of keys) {
// // anahtarın değerini al
// let value = scheme[key];
// // değerin tipine göre farklı işlemler yap
// if (typeof value === "string") {
// // değer string ise, direkt yazdır
// textarea.value += key + ": " + value + "\n\n";
// } else if (value instanceof Uint8Array) {
// value = base64_encode(value);
// // değer Uint8Array ise, elemanlarını yazdır
// // textarea.value += key + ": " + value.join(", ") + "\n\n";
// textarea.value += key + ": " + value + "\n\n";
// } else {
// // değer başka bir tip ise, hata mesajı ver
// textarea.value += "Geçersiz değer tipi\n\n";
// }
// }
// }
// }testencryptscheme("Hello World","123");
</script>
<!-- V -->
<!--
<br><br>
<h1 class="container" style="border:none!important;box-shadow:none!important;background:transparent!important;">How To Use ?</h1>
<div style="text-align: center;">
<video style="width:100%;margin:0 auto;max-width: 620px;border-radius:15px;" controls>
<source src="https://github.com/h6465617468/SilverCipher/raw/main/video/scm_promotion.mp4" type="video/mp4">
</video>
</div>
-->
<br><br>
<h1 class="container" style="border:none!important;box-shadow:none!important;background:transparent!important;">Information</h1>
<p style="margin-bottom:10px;">It is absolutely javascript based only. Does not use php script. It works on your local browser.</p>
<h1 class="container" style="border:none!important;box-shadow:none!important;background:transparent!important;">The project is open source.</h1>
<h1 class="container" style="border:none!important;box-shadow:none!important;background:transparent!important;"><a href="https://github.com/h6465617468/SilverCipher/">Source Codes</a></h1>
<h1 class="container" style="border:none!important;box-shadow:none!important;background:transparent!important;"><a href="https://github.com/h6465617468/SilverCipher/blob/main/sc5.js">SCP Source Codes</a></h1>
<h1 class="container" style="border:none!important;box-shadow:none!important;background:transparent!important;"><a href="scp.html">SCP Encryption Tool</a></h1>
<br><br>
<!--SCRIPTS-->
<script>
function beep() {
var snd = new Audio("data:audio/wav;base64,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qJrx4KOQjahZxWbcZgztj2c49nKmkId44S71j0c8eV9yDK6uPRzx5X18eDvjvQ6yKo9ZSS6l//8elePK/Lf//IInrOF/FvDoADYAGBMGb7FtErm5MXMlmPAJQVgWta7Zx2go+8xJ0UiCb8LHHdftWyLJE0QIAIsI+UbXu67dZMjmgDGCGl1H+vpF4NSDckSIkk7Vd+sxEhBQMRU8j/12UIRhzSaUdQ+rQU5kGeFxm+hb1oh6pWWmv3uvmReDl0UnvtapVaIzo1jZbf/pD6ElLqSX+rUmOQNpJFa/r+sa4e/pBlAABoAAAAA3CUgShLdGIxsY7AUABPRrgCABdDuQ5GC7DqPQCgbbJUAoRSUj+NIEig0YfyWUho1VBBBA//uQZB4ABZx5zfMakeAAAAmwAAAAF5F3P0w9GtAAACfAAAAAwLhMDmAYWMgVEG1U0FIGCBgXBXAtfMH10000EEEEEECUBYln03TTTdNBDZopopYvrTTdNa325mImNg3TTPV9q3pmY0xoO6bv3r00y+IDGid/9aaaZTGMuj9mpu9Mpio1dXrr5HERTZSmqU36A3CumzN/9Robv/Xx4v9ijkSRSNLQhAWumap82WRSBUqXStV/YcS+XVLnSS+WLDroqArFkMEsAS+eWmrUzrO0oEmE40RlMZ5+ODIkAyKAGUwZ3mVKmcamcJnMW26MRPgUw6j+LkhyHGVGYjSUUKNpuJUQoOIAyDvEyG8S5yfK6dhZc0Tx1KI/gviKL6qvvFs1+bWtaz58uUNnryq6kt5RzOCkPWlVqVX2a/EEBUdU1KrXLf40GoiiFXK///qpoiDXrOgqDR38JB0bw7SoL+ZB9o1RCkQjQ2CBYZKd/+VJxZRRZlqSkKiws0WFxUyCwsKiMy7hUVFhIaCrNQsKkTIsLivwKKigsj8XYlwt/WKi2N4d//uQRCSAAjURNIHpMZBGYiaQPSYyAAABLAAAAAAAACWAAAAApUF/Mg+0aohSIRobBAsMlO//Kk4soosy1JSFRYWaLC4qZBYWFRGZdwqKiwkNBVmoWFSJkWFxX4FFRQWR+LsS4W/rFRb/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////VEFHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAU291bmRib3kuZGUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMjAwNGh0dHA6Ly93d3cuc291bmRib3kuZGUAAAAAAAAAACU=");
snd.play();
}
function setVisible(selector, visible) {
document.querySelector(selector).style.display = visible ? 'block' : 'none';
}
function btnx(selector, disabled) { document.querySelector(selector).disabled = disabled ? 'true' : 'false'; if (disabled) { document.querySelector(selector).setAttribute("disabled", "true"); } if (!disabled) { document.querySelector(selector).removeAttribute("disabled"); } }
function changeText_JS(value) {
// seçim elementini bul
var select = document.getElementById("rsamode");
// seçim elementinin seçili seçeneğini bul
var selectedOption = select.options[select.selectedIndex];
// seçim elementinin tüm seçeneklerini döngüye sok
for (var i = 0; i < select.options.length; i++) {
// seçeneğin değeri ve metnini al
var option = select.options[i];
var optionValue = option.value;
var optionText = option.text;
// değer ve metni eşleşirse metni değiştir
if (optionValue == value) {
select.value = value;
select.text = optionText;
}
}
}
function changescm_JS(value) {
// seçim elementini bul
var select = document.getElementById("scmode");
// seçim elementinin seçili seçeneğini bul
var selectedOption = select.options[select.selectedIndex];
// seçim elementinin tüm seçeneklerini döngüye sok
for (var i = 0; i < select.options.length; i++) {
// seçeneğin değeri ve metnini al
var option = select.options[i];
var optionValue = option.value;
var optionText = option.text;
// değer ve metni eşleşirse metni değiştir
if (optionValue == value) {
select.value = value;
select.text = optionText;
}
}
}
function changescdatamode_JS(value) {
// seçim elementini bul
var select = document.getElementById("scdatamode");
// seçim elementinin seçili seçeneğini bul
var selectedOption = select.options[select.selectedIndex];
// seçim elementinin tüm seçeneklerini döngüye sok
for (var i = 0; i < select.options.length; i++) {
// seçeneğin değeri ve metnini al
var option = select.options[i];
var optionValue = option.value;
var optionText = option.text;
// değer ve metni eşleşirse metni değiştir
if (optionValue == value) {
select.value = value;
select.text = optionText;
}
}
}
function changescpaddround_JS(value) {
// seçim elementini bul
var select = document.getElementById("scpaddround");
// seçim elementinin seçili seçeneğini bul
var selectedOption = select.options[select.selectedIndex];
// seçim elementinin tüm seçeneklerini döngüye sok
for (var i = 0; i < select.options.length; i++) {
// seçeneğin değeri ve metnini al
var option = select.options[i];
var optionValue = option.value;
var optionText = option.text;
// değer ve metni eşleşirse metni değiştir
if (optionValue == value) {
select.value = value;
select.text = optionText;
}
}
}
function changescblock_JS(value) {
// seçim elementini bul
var select = document.getElementById("scblock");
// seçim elementinin seçili seçeneğini bul
var selectedOption = select.options[select.selectedIndex];
// seçim elementinin tüm seçeneklerini döngüye sok
for (var i = 0; i < select.options.length; i++) {
// seçeneğin değeri ve metnini al
var option = select.options[i];
var optionValue = option.value;
var optionText = option.text;
// değer ve metni eşleşirse metni değiştir
if (optionValue == value) {
select.value = value;
select.text = optionText;
}
}
}
function kopyalax() {
var inputx = document.getElementById("ortak").value;
// Metni tutacak bir element oluştur
var input = document.createElement("input");
// Elementin değerini ortak değişkenine eşitle
input.value = inputx;
// Elementi sayfaya ekle
document.body.appendChild(input);
// Elementin metnini seç
input.select();
// Metni panoya kopyala
document.execCommand("copy");
// Elementi sayfadan sil
document.body.removeChild(input);
input.select(); // metni seç
document.execCommand("copy"); // panoya kopyala
}
function clearx() {
var input = document.getElementById("ortak");
input.value = ""; // metni seç
}
function yapistirx(){var t=document.getElementById("ortak");t&&navigator.clipboard.readText().then(function(n){t.value=n}).catch(function(n){console.error(n)})}
function randomInRange(a,b){var c=Math.random()*(b-a+1),d=Math.floor(c);return a+d}
function randomx(){for(var b,c="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+abcdefghjklmnopqrstuvwxyz$@?&%#",a="",d=randomInRange(128,192),f=0;f<d;f++)a+=(b=b=void 0,b=c.length,b=Math.floor(Math.random()*b),c.charAt(b));document.getElementById("ortak").value=a}
function kopyala4() {
var textarea = document.getElementById("bizim_private_keyimiz");
textarea.select(); // metni seç
document.execCommand("copy"); // panoya kopyala
}
function yapistir4(){var t=document.getElementById("bizim_private_keyimiz");t&&navigator.clipboard.readText().then(function(n){t.value=n}).catch(function(n){console.error(n)})}
function kopyala3() {
var textarea = document.getElementById("bizim_public_keyimiz");
textarea.select(); // metni seç
document.execCommand("copy"); // panoya kopyala
}
function yapistir3(){var t=document.getElementById("bizim_public_keyimiz");t&&navigator.clipboard.readText().then(function(n){t.value=n}).catch(function(n){console.error(n)})}
function clear4() {
var textarea = document.getElementById("bizim_private_keyimiz");
textarea.value = ""; // metni seç
}
function inject4() {
var ortak_anahtar = document.getElementById("ortak").value;
if(ortak_anahtar == "" || ortak_anahtar == null){
alert("Symmetric Key Required");
return;
}
var e1 = document.getElementById("scmode"); // seçim elementini bul
var scmode1 = e1.value; // seçilen seçeneğin metnini al
var cipher = new SilverCipherMini(ortak_anahtar);
var textarea = document.getElementById("bizim_private_keyimiz");
var bizim_private_keyimiz = textarea.value.trim();
if (bizim_private_keyimiz.startsWith("-----BEGIN RSA PRIVATE KEY-----")) {
textarea.value = cipher.Encrypt(bizim_private_keyimiz);
} else {
alert("The key is not in PEM format");
}
}
function clear3() {
var textarea = document.getElementById("bizim_public_keyimiz");
textarea.value = ""; // metni seç
}
function inject3() {
var ortak_anahtar = document.getElementById("ortak").value;
if(ortak_anahtar == "" || ortak_anahtar == null){
alert("Symmetric Key Required");
return;
}
var e1 = document.getElementById("scmode"); // seçim elementini bul
var scmode1 = e1.value; // seçilen seçeneğin metnini al
var cipher = new SilverCipherMini(ortak_anahtar);
var textarea = document.getElementById("bizim_public_keyimiz");
var bizim_public_keyimiz = textarea.value.trim();
if (bizim_public_keyimiz.startsWith("-----BEGIN PUBLIC KEY-----")) {
textarea.value = cipher.Encrypt(bizim_public_keyimiz);
} else {
alert("The key is not in PEM format");
}
}
function kopyala2() {
var textarea = document.getElementById("target_public_key");
textarea.select(); // metni seç
document.execCommand("copy"); // panoya kopyala
}
function yapistir2(){var t=document.getElementById("target_public_key");t&&navigator.clipboard.readText().then(function(n){t.value=n}).catch(function(n){console.error(n)})}
function clear2() {
var textarea = document.getElementById("target_public_key");
textarea.value = ""; // metni seç
}
function inject2() {
var ortak_anahtar = document.getElementById("ortak").value;
if(ortak_anahtar == "" || ortak_anahtar == null){
alert("Symmetric Key Required");
return;
}
var e1 = document.getElementById("scmode"); // seçim elementini bul
var scmode1 = e1.value; // seçilen seçeneğin metnini al
var cipher = new SilverCipherMini(ortak_anahtar);
var textarea = document.getElementById("target_public_key");
var target_public_key = textarea.value.trim();
if (target_public_key.startsWith("-----BEGIN PUBLIC KEY-----")) {
textarea.value = cipher.Encrypt(target_public_key);
} else {
alert("The key is not in PEM format");
}
}
function kopyala1() {
var textarea = document.getElementById("sifrelenecek_rsa_mesaji");
textarea.select(); // metni seç
document.execCommand("copy"); // panoya kopyala
}
function yapistir1(){var t=document.getElementById("sifrelenecek_rsa_mesaji");t&&navigator.clipboard.readText().then(function(n){t.value=n}).catch(function(n){console.error(n)})}
function clear1() {
var textarea = document.getElementById("sifrelenecek_rsa_mesaji");
textarea.value = ""; // metni seç
}
function kopyala0() {
var textarea = document.getElementById("arkadasinin_sifreli_mesaji");
textarea.select(); // metni seç
document.execCommand("copy"); // panoya kopyala
}
function yapistir0(){var t=document.getElementById("arkadasinin_sifreli_mesaji");t&&navigator.clipboard.readText().then(function(n){t.value=n}).catch(function(n){console.error(n)})}
function clear0() {
var textarea = document.getElementById("arkadasinin_sifreli_mesaji");
textarea.value = ""; // metni seç
}
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=Base64._utf8_encode(e);while(f<e.length){n=e.charCodeAt(f++);r=e.charCodeAt(f++);i=e.charCodeAt(f++);s=n>>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a)}return t},decode:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(f<e.length){s=this._keyStr.indexOf(e.charAt(f++));o=this._keyStr.indexOf(e.charAt(f++));u=this._keyStr.indexOf(e.charAt(f++));a=this._keyStr.indexOf(e.charAt(f++));n=s<<2|o>>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=Base64._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");var t="";for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<128){t+=String.fromCharCode(r)}else if(r>127&&r<2048){t+=String.fromCharCode(r>>6|192);t+=String.fromCharCode(r&63|128)}else{t+=String.fromCharCode(r>>12|224);t+=String.fromCharCode(r>>6&63|128);t+=String.fromCharCode(r&63|128)}}return t},_utf8_decode:function(e){var t="";var n=0;var r=c1=c2=0;while(n<e.length){r=e.charCodeAt(n);if(r<128){t+=String.fromCharCode(r);n++}else if(r>191&&r<224){c2=e.charCodeAt(n+1);t+=String.fromCharCode((r&31)<<6|c2&63);n+=2}else{c2=e.charCodeAt(n+1);c3=e.charCodeAt(n+2);t+=String.fromCharCode((r&15)<<12|(c2&63)<<6|c3&63);n+=3}}return t}}
function str_splitx(string, splitLength) {
if (splitLength === null) {
splitLength = 1
}
if (string === null || splitLength < 1) {
return false
}
string += ''
const chunks = []
let pos = 0
const len = string.length
while (pos < len) {
chunks.push(string.slice(pos, pos += splitLength))
}
return chunks
}
var _process__key_gen = 0;
function key_gen_main(sizex){
if(_process__key_gen==1){return;}
_process__key_gen=1;
btnx("#btn2048",true);
btnx("#btn3072",true);
btnx("#btn4096",true);
btnx("#btn5000",true);
btnx("#btn8192",true);
btnx("#btn16384",true);
// var ortak_anahtar = document.getElementById("ortak").value;
// if(ortak_anahtar == "" || ortak_anahtar == null){
// btnx("#btn2048",false);
// btnx("#btn3072",false);
// btnx("#btn4096",false);
// btnx("#btn5000",false);
// btnx("#btn8192",false);
// btnx("#btn16384",false);
// _process__key_gen=0;
// alert("Symmetric Key Required");
// return;
// }
var e1 = document.getElementById("scmode"); // seçim elementini bul
var scmode1 = e1.value; // seçilen seçeneğin metnini al
//var cipher = new SilverCipherMini(ortak_anahtar);
setVisible('#loading', true);
var _cache_title_ = document.title;
document.title = sizex+ "/Key Generating...";
var change = document.getElementById("loadingdurum");
change.innerText="RSA " + sizex + " Bit Key Generating...";
var crypt9 = new JSEncrypt({default_key_size: sizex});
new Promise((resolve)=>{
setTimeout(resolve, 100);
}).then( ()=>{
crypt9.getKey();
}).catch( ()=>{
btnx("#btn2048",false);
btnx("#btn3072",false);
btnx("#btn4096",false);
btnx("#btn5000",false);
btnx("#btn8192",false);
btnx("#btn16384",false);
_process__key_gen=0;
}).finally(() => {
var publicasdasdas=crypt9.getPublicKey();
var privateKeyElement = document.getElementById("bizim_private_keyimiz");
privateKeyElement.value = crypt9.getPrivateKey();
var publicKeyElement = document.getElementById("bizim_public_keyimiz");
publicKeyElement.value = publicasdasdas;
_process__key_gen=0;
setVisible('#loading', false);
document.title = _cache_title_;
beep();
btnx("#btn2048",false);
btnx("#btn3072",false);
btnx("#btn4096",false);
btnx("#btn5000",false);
btnx("#btn8192",false);
btnx("#btn16384",false);
});
}
function encrypt_1(key, iv, plaintext) {
const keyHex = CryptoJS.enc.Hex.parse(key);
const ivHex = CryptoJS.enc.Hex.parse(iv);
const encrypted = CryptoJS.AES.encrypt(plaintext, keyHex, {
iv: ivHex,
mode: CryptoJS.mode.CBC,
padding: CryptoJS.pad.Pkcs7,
});
return encrypted.ciphertext.toString(CryptoJS.enc.Base64);
}
function decrypt_1(key, iv, ciphertext) {
const keyHex = CryptoJS.enc.Hex.parse(key);
const ivHex = CryptoJS.enc.Hex.parse(iv);
const decrypted = CryptoJS.AES.decrypt({
ciphertext: CryptoJS.enc.Base64.parse(ciphertext),
}, keyHex, {
iv: ivHex,
mode: CryptoJS.mode.CBC,
padding: CryptoJS.pad.Pkcs7,
});
return decrypted.toString(CryptoJS.enc.Utf8);
}
function encryptData(cache_x_RSA,key,myprivate){
var cache_signp="";
var cache_109=str_splitx(cache_x_RSA,128);
var crypted0193=[];
var asjdasjdajs=[];
cache_109.forEach(function(data5) {
var crypt123123123 = new JSEncrypt();
crypt123123123.setPrivateKey(myprivate.trim());
var fsdkjf34o2it2=Base64.encode(data5);
cache_signp=crypt123123123.sign(fsdkjf34o2it2, CryptoJS.SHA256, "sha256");
asjdasjdajs.push({"text":fsdkjf34o2it2,"sign":cache_signp});
delete fsdkjf34o2it2;
});
var cache_123123=JSON.stringify(asjdasjdajs);
var cryptedasdasdas1111=[];
cache_12312asdasdas3=str_splitx(cache_123123,128);
cache_12312asdasdas3.forEach(function(data10, index1) {
var crypt = new JSEncrypt();
crypt.setPublicKey(key.trim());
cryptedasdasdas1111.push(crypt.encrypt(data10));
});
crypted0193.push(JSON.stringify(cryptedasdasdas1111));
delete cache_109;
return JSON.stringify(crypted0193);
}
function decryptData(encryptedData, myprivate, key) {
var decryptedData = "";
try {
var crypted0193 = JSON.parse(encryptedData);
var cryptedasdasdas1111 = JSON.parse(crypted0193[0]);
var asjdasjdajs = [];
var asdasdasd="";
cryptedasdasdas1111.forEach(function(data10, index1) {
var crypt = new JSEncrypt();
crypt.setPrivateKey(myprivate.trim());
var decryptedData1 = crypt.decrypt(data10);
asdasdasd=asdasdasd+decryptedData1;
delete decryptedData1;
});
asjdasjdajs = asjdasjdajs.concat(JSON.parse(asdasdasd));
asjdasjdajs.forEach(function(data5) {
var crypt123123123 = new JSEncrypt();
crypt123123123.setPublicKey(key.trim());
var signature = data5.sign;
var plaintext = data5.text;
var isSignatureValid = crypt123123123.verify(plaintext, signature, CryptoJS.SHA256);
if (isSignatureValid) {
decryptedData += Base64.decode(plaintext);
} else {
return "";
/*throw new Error("Invalid signature!");*/
}
delete signature, plaintext;
});
} catch (e) {
return "";
/*throw new Error("Decryption failed! " + e.message);*/
}
return decryptedData;
}
//Base64.encode()
function encryptData_FLEXMODE(cache_x_RSA,key,myprivate)
{
cache_x_RSA = cache_x_RSA;
var cache_signp="";
var sava1sf = "";
try {
var crypt123123123 = new JSEncrypt();
crypt123123123.setPrivateKey(myprivate.trim());
cache_signp=crypt123123123.sign(cache_x_RSA, CryptoJS.SHA256, "sha256");
var cache_109=str_splitx(cache_x_RSA,128);
// döngüdeki son elemanın indeksini bul
var lastIndex = cache_109.length - 1;
cache_109.forEach(function(data5, index) {
var crypt = new JSEncrypt();
crypt.setPublicKey(key.trim());
var hjd = crypt.encrypt(data5);
// eğer son eleman ise # eklemeyi atla
if (index == lastIndex) {
sava1sf=sava1sf+hjd;
} else {
sava1sf=sava1sf+hjd+"#";
}
});
} catch (e) {return "";}
return sava1sf+"#"+cache_signp;
}
function decryptData_FLEXMODE(encryptedData, myprivate, key) {
var asdasdasd="";
try {
// encryptedData değerini # ile böl
var parts = encryptedData.split("#");
// son parçayı signature değerine ata
var signature = parts.pop();
parts.forEach(function(data10) {
var crypt = new JSEncrypt();
crypt.setPrivateKey(myprivate.trim());
var decryptedData1 = crypt.decrypt(data10);
asdasdasd=asdasdasd+decryptedData1;
delete decryptedData1;
});
var crypt123123123 = new JSEncrypt();
crypt123123123.setPublicKey(key.trim());
var isSignatureValid = crypt123123123.verify(asdasdasd, signature, CryptoJS.SHA256);
if (isSignatureValid) {
} else {
return "";
}
} catch (e) {return "";}
return asdasdasd;
}
var _proces__enc_dec=0;
async function friend_sent_encrypted_message(__data__=null,__type__=null,__name__=null) {
if(_proces__enc_dec==1){return;}
_proces__enc_dec=1;
var _cache_title_ = document.title;
btnx("#encryptbtn",true);
setVisible('#loading', true);
document.title = "Encoding ...";
var change = document.getElementById("loadingdurum");
change.innerText="Encoding ...";
new Promise((resolve)=>{
setTimeout(resolve, 100);
}).then( ()=>{
}).catch( ()=>{
_proces__enc_dec=0;
document.title = _cache_title_;