File tree Expand file tree Collapse file tree 2 files changed +24
-3
lines changed
Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -18,19 +18,30 @@ public class Program
1818 public static void Main ( string [ ] args )
1919 {
2020 bool success = true ;
21- string cmd ;
2221
2322 try
2423 {
2524 if ( args . Length == 1 )
2625 {
2726 if ( args [ 0 ] . StartsWith ( "--decrypt=" ) )
2827 {
29- cmd = args [ 0 ] . Remove ( 0 , 10 ) ;
28+ if ( args [ 0 ] . EndsWith ( ".bytes" ) ) BytesToJsonFile ( args [ 0 ] [ 10 ..] ) ;
29+ else if ( args [ 0 ] . EndsWith ( ".json" ) )
30+ {
31+ Console . WriteLine ( "Wrong file extension!" ) ;
32+ success = false ;
33+ }
34+ else BytesToJsonDirectory ( args [ 0 ] [ 10 ..] ) ;
3035 }
3136 else if ( args [ 0 ] . StartsWith ( "--encrypt=" ) )
3237 {
33- cmd = args [ 0 ] . Remove ( 0 , 10 ) ;
38+ if ( args [ 0 ] . EndsWith ( ".json" ) ) { }
39+ else if ( args [ 0 ] . EndsWith ( ".bytes" ) )
40+ {
41+ Console . WriteLine ( "Wrong file extension!" ) ;
42+ success = false ;
43+ }
44+ else { }
3445 }
3546 else if ( args [ 0 ] . EndsWith ( ".bytes" ) )
3647 {
@@ -171,5 +182,15 @@ private static void BytesToJsonFile(string path)
171182 }
172183 }
173184 }
185+
186+ private static void JsonToBytesDirectory ( string path )
187+ {
188+
189+ }
190+
191+ private static void JsonToBytesFile ( string path )
192+ {
193+
194+ }
174195 }
175196}
You can’t perform that action at this time.
0 commit comments