├── .eslintignore ├── .eslintrc.json ├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── .yarn └── releases │ └── yarn-3.6.3.cjs ├── .yarnrc.yml ├── LICENSE ├── README.md ├── package.json ├── public ├── electron.js ├── favicon.ico ├── index.html ├── logo192.png ├── logo512.png ├── manifest.json └── workers │ ├── FileWorker │ └── index.html │ └── TextWorker │ └── index.html ├── src ├── components │ ├── AlertDialog │ │ └── index.jsx │ ├── App │ │ └── index.jsx │ ├── BackButton │ │ └── index.jsx │ ├── CompareField │ │ └── index.jsx │ ├── ConfirmationDialog │ │ └── index.jsx │ ├── CopyPasteMenu │ │ └── index.jsx │ ├── CryptographyMenu │ │ └── index.jsx │ ├── CsvExport │ │ └── index.jsx │ ├── DrawerBar │ │ └── index.jsx │ ├── DropZone │ │ └── index.jsx │ ├── GridList │ │ └── index.jsx │ ├── Hash │ │ └── index.jsx │ ├── HashList │ │ └── index.jsx │ ├── LoadingBar │ │ └── index.jsx │ ├── PageHeader │ │ └── index.jsx │ ├── Theme │ │ ├── blank.png │ │ └── index.jsx │ ├── TopBar │ │ └── index.jsx │ └── UpdateDialog │ │ └── index.jsx ├── contexts │ ├── CryptoContextReducer │ │ └── index.jsx │ └── MainContextProvider │ │ └── index.jsx ├── index.css ├── index.jsx ├── languages │ ├── de_DE │ │ └── index.js │ ├── en_US │ │ └── index.js │ ├── es_ES │ │ └── index.js │ ├── fr_FR │ │ └── index.js │ ├── it_IT │ │ └── index.js │ ├── jp_JP │ │ └── index.js │ ├── nl_NL │ │ └── index.js │ ├── pt_PT │ │ └── index.js │ ├── ru_RU │ │ └── index.js │ └── tr_TR │ │ └── index.js ├── reducers │ ├── CryptoReducer │ │ ├── Actions │ │ │ ├── actionTypes.js │ │ │ └── index.js │ │ └── index.js │ └── MainReducer │ │ ├── Actions │ │ ├── actionTypes.js │ │ └── index.js │ │ └── index.js ├── routes │ ├── About │ │ └── index.jsx │ ├── File │ │ └── index.jsx │ ├── Settings │ │ └── index.jsx │ └── Text │ │ └── index.jsx └── utils │ ├── ThemeSelector │ └── index.js │ └── Updater │ └── index.js └── yarn.lock /.eslintignore: -------------------------------------------------------------------------------- 1 | .github 2 | .yarn 3 | node_modules 4 | build 5 | src/serviceWorker.js 6 | README.md 7 | .eslintcache 8 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es2021": true, 5 | "node": true 6 | }, 7 | "extends": [ 8 | "plugin:react/recommended", 9 | "airbnb" 10 | ], 11 | "parserOptions": { 12 | "ecmaFeatures": { 13 | "jsx": true 14 | }, 15 | "ecmaVersion": "latest", 16 | "sourceType": "module" 17 | }, 18 | "plugins": [ 19 | "react" 20 | ], 21 | "rules": { 22 | "react/function-component-definition": [ 23 | 2, 24 | { 25 | "namedComponents": "arrow-function", 26 | "unnamedComponents": "arrow-function" 27 | } 28 | ], 29 | "react/prop-types": 0 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: "[BUG]" 5 | labels: bug 6 | assignees: CodeDead 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. Windows 10] 28 | - Version: [e.g. 2.0.0] 29 | 30 | **Additional context** 31 | Add any other context about the problem here. 32 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: "[SUGGESTION]" 5 | labels: Suggestion 6 | assignees: CodeDead 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | 25 | .idea 26 | .idea/* 27 | .vscode/* 28 | dist/* 29 | 30 | .yarn/* 31 | !.yarn/releases 32 | !.yarn/plugins 33 | !.yarn/sdks 34 | !.yarn/versions 35 | .pnp.* 36 | 37 | .eslintcache 38 | -------------------------------------------------------------------------------- /.yarnrc.yml: -------------------------------------------------------------------------------- 1 | nodeLinker: node-modules 2 | 3 | yarnPath: .yarn/releases/yarn-3.6.3.cjs 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![DeadHash](https://i.imgur.com/CkzWk7u.png) 2 | 3 | # DeadHash 4 | 5 | ![GitHub package.json version](https://img.shields.io/github/package-json/v/CodeDead/DeadHash-js) 6 | ![GitHub](https://img.shields.io/github/license/CodeDead/DeadHash-Js) 7 | ![GitHub all releases](https://img.shields.io/github/downloads/CodeDead/DeadHash-js/total) 8 | 9 | DeadHash is a free and open-source utility to calculate file and text hashes and checksums. The following calculations are supported: 10 | 11 | * MD4 12 | * MD5 13 | * SHA-1 14 | * SHA-224 15 | * SHA-256 16 | * SHA-384 17 | * SHA-512 18 | * RIPEMD-160 19 | * CRC1 20 | * CRC8 21 | * CRC16 22 | * CRC24 23 | * CRC32 24 | 25 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app) and built using [Electron](https://electronjs.org/). 26 | 27 | ## Building 28 | 29 | In order to produce binary distributable files, you must issue the following command: 30 | ```shell 31 | yarn build 32 | ``` 33 | 34 | If you want to start the development version, you can issue the following command: 35 | ```shell 36 | yarn start 37 | ``` 38 | 39 | ## Learn More 40 | 41 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 42 | 43 | To learn React, check out the [React documentation](https://reactjs.org/). 44 | 45 | To learn Electron, check out the [Electron documentation](https://electronjs.org/). 46 | 47 | ## About 48 | 49 | This library is maintained by CodeDead. You can find more about us using the following links: 50 | * [Website](https://codedead.com) 51 | * [Twitter](https://twitter.com/C0DEDEAD) 52 | * [Facebook](https://facebook.com/deadlinecodedead) 53 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "deadhash", 3 | "version": "2.2.3", 4 | "description": "File and text hash calculator", 5 | "homepage": "./", 6 | "private": true, 7 | "author": { 8 | "name": "CodeDead", 9 | "email": "admin@codedead.com", 10 | "url": "https://codedead.com" 11 | }, 12 | "build": { 13 | "appId": "com.codedead.deadhash", 14 | "productName": "DeadHash", 15 | "copyright": "Copyright © 2022 ${author}", 16 | "win": { 17 | "target": [ 18 | "nsis", 19 | "portable" 20 | ], 21 | "icon": "public/logo512.png" 22 | }, 23 | "linux": { 24 | "target": [ 25 | "AppImage" 26 | ], 27 | "icon": "public/logo512.png" 28 | }, 29 | "nsis": { 30 | "license": "LICENSE", 31 | "oneClick": false, 32 | "perMachine": false, 33 | "allowToChangeInstallationDirectory": true 34 | } 35 | }, 36 | "main": "public/electron.js", 37 | "dependencies": { 38 | "@emotion/react": "^11.11.1", 39 | "@emotion/styled": "^11.11.0", 40 | "@mui/icons-material": "^5.14.9", 41 | "@mui/material": "^5.14.10", 42 | "crc": "^4.3.2", 43 | "cross-env": "^7.0.3", 44 | "electron-is-dev": "^2.0.0", 45 | "react": "^18.2.0", 46 | "react-contexify": "^6.0.0", 47 | "react-dom": "^18.2.0", 48 | "react-router-dom": "^6.16.0", 49 | "react-scripts": "^5.0.1" 50 | }, 51 | "scripts": { 52 | "react-start": "react-scripts start", 53 | "react-build": "react-scripts build", 54 | "react-test": "react-scripts test", 55 | "react-eject": "react-scripts eject", 56 | "electron-build": "electron-builder", 57 | "release": "yarn react-build && electron-builder -wl --publish=always", 58 | "build": "yarn react-build && yarn electron-build -wl", 59 | "start": "yarn react-build && concurrently \"cross-env BROWSER=none yarn react-start\" \"wait-on http://localhost:3000 && electron .\"" 60 | }, 61 | "browserslist": { 62 | "production": [ 63 | ">0.2%", 64 | "not dead", 65 | "not op_mini all" 66 | ], 67 | "development": [ 68 | "last 1 chrome version", 69 | "last 1 firefox version", 70 | "last 1 safari version" 71 | ] 72 | }, 73 | "devDependencies": { 74 | "concurrently": "^8.2.1", 75 | "electron": "^26.2.1", 76 | "electron-builder": "^24.6.4", 77 | "eslint": "^8.49.0", 78 | "eslint-config-airbnb": "^19.0.4", 79 | "eslint-plugin-import": "^2.28.1", 80 | "eslint-plugin-jsx-a11y": "^6.7.1", 81 | "eslint-plugin-react": "^7.33.2", 82 | "eslint-plugin-react-hooks": "^4.6.0", 83 | "wait-on": "^7.0.1" 84 | }, 85 | "packageManager": "yarn@3.6.3" 86 | } 87 | -------------------------------------------------------------------------------- /public/electron.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line import/no-extraneous-dependencies 2 | const electron = require('electron'); 3 | 4 | const { app, ipcMain, BrowserWindow } = electron; 5 | const path = require('path'); 6 | const isDev = require('electron-is-dev'); 7 | 8 | let mainWindow; 9 | let fileWorkerWindow; 10 | let textWorkerWindow; 11 | 12 | const createWindow = () => { 13 | mainWindow = new BrowserWindow({ 14 | webPreferences: { 15 | nodeIntegration: true, 16 | contextIsolation: false, 17 | }, 18 | frame: false, 19 | title: 'DeadHash', 20 | width: 960, 21 | height: 520, 22 | icon: path.join(__dirname, '../build/logo512.png'), 23 | }); 24 | 25 | fileWorkerWindow = new BrowserWindow({ 26 | show: isDev, 27 | icon: path.join(__dirname, '../build/logo512.png'), 28 | webPreferences: { nodeIntegration: true, contextIsolation: false }, 29 | }); 30 | 31 | textWorkerWindow = new BrowserWindow({ 32 | show: isDev, 33 | icon: path.join(__dirname, '../build/logo512.png'), 34 | webPreferences: { nodeIntegration: true, contextIsolation: false }, 35 | }); 36 | 37 | if (isDev) { 38 | mainWindow.webContents.openDevTools(); 39 | fileWorkerWindow.webContents.openDevTools(); 40 | textWorkerWindow.webContents.openDevTools(); 41 | } else { 42 | electron.Menu.setApplicationMenu(null); 43 | } 44 | 45 | mainWindow.removeMenu(); 46 | mainWindow.loadURL(isDev ? 'http://localhost:3000' : `file://${path.join(__dirname, '../build/index.html')}`); 47 | mainWindow.on('closed', () => { 48 | mainWindow = null; 49 | if (fileWorkerWindow) fileWorkerWindow.close(); 50 | if (textWorkerWindow) textWorkerWindow.close(); 51 | }); 52 | 53 | fileWorkerWindow.loadURL(`file://${path.join(__dirname, isDev ? './workers/FileWorker/index.html' : '../build/workers/FileWorker/index.html')}`); 54 | fileWorkerWindow.on('closed', () => { 55 | fileWorkerWindow = null; 56 | if (textWorkerWindow) textWorkerWindow.close(); 57 | if (mainWindow) mainWindow.close(); 58 | }); 59 | 60 | textWorkerWindow.loadURL(`file://${path.join(__dirname, isDev ? './workers/TextWorker/index.html' : '../build/workers/TextWorker/index.html')}`); 61 | textWorkerWindow.on('closed', () => { 62 | textWorkerWindow = null; 63 | if (fileWorkerWindow) fileWorkerWindow.close(); 64 | if (mainWindow) mainWindow.close(); 65 | }); 66 | 67 | mainWindow.webContents.on('new-window', (event, arg) => { 68 | event.preventDefault(); 69 | electron.shell.openExternal(arg); 70 | }); 71 | 72 | mainWindow.on('maximize', () => { 73 | mainWindow.webContents.send('window-maximized'); 74 | }); 75 | 76 | mainWindow.on('unmaximize', () => { 77 | mainWindow.webContents.send('window-unmaximized'); 78 | }); 79 | }; 80 | 81 | app.whenReady() 82 | .then(createWindow); 83 | 84 | app.on('window-all-closed', () => { 85 | if (process.platform !== 'darwin') { 86 | app.quit(); 87 | } 88 | }); 89 | 90 | app.on('activate', () => { 91 | if (BrowserWindow.getAllWindows().length === 0) { 92 | createWindow(); 93 | } 94 | }); 95 | 96 | ipcMain.on('handle-close', () => { 97 | if (mainWindow) mainWindow.close(); 98 | }); 99 | 100 | ipcMain.on('handle-maximize', () => { 101 | if (mainWindow) { 102 | if (mainWindow.isMaximized()) { 103 | mainWindow.unmaximize(); 104 | } else { 105 | mainWindow.maximize(); 106 | } 107 | } 108 | }); 109 | 110 | ipcMain.on('handle-minimize', () => { 111 | if (mainWindow) { 112 | mainWindow.minimize(); 113 | } 114 | }); 115 | 116 | ipcMain.on('get-version', (e) => { 117 | e.reply('get-version-reply', app.getVersion()); 118 | }); 119 | 120 | ipcMain.on('calculate-file-hash', (e, data) => { 121 | if (fileWorkerWindow) { 122 | fileWorkerWindow.webContents.send('calculate-file-hash', data); 123 | } 124 | }); 125 | 126 | ipcMain.on('file-hash-calculated', (e, data) => { 127 | if (mainWindow) { 128 | mainWindow.webContents.send('file-hash-calculated', data); 129 | } 130 | }); 131 | 132 | ipcMain.on('file-hash-calculation-error', (e, data) => { 133 | if (mainWindow) { 134 | mainWindow.webContents.send('file-hash-calculation-error', data); 135 | } 136 | }); 137 | 138 | ipcMain.on('calculate-text-hash', (e, data) => { 139 | if (textWorkerWindow) { 140 | textWorkerWindow.webContents.send('calculate-text-hash', data); 141 | } 142 | }); 143 | 144 | ipcMain.on('text-hash-calculated', (e, data) => { 145 | if (mainWindow) { 146 | mainWindow.webContents.send('text-hash-calculated', data); 147 | } 148 | }); 149 | 150 | ipcMain.on('text-hash-calculation-error', (e, data) => { 151 | if (mainWindow) { 152 | mainWindow.webContents.send('text-hash-calculation-error', data); 153 | } 154 | }); 155 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeDead/DeadHash-js/8a704ba923be066377f61b38f9892008d3fcdaf0/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 19 | 20 | 29 | DeadHash 30 | 31 | 32 | 33 |
34 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeDead/DeadHash-js/8a704ba923be066377f61b38f9892008d3fcdaf0/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeDead/DeadHash-js/8a704ba923be066377f61b38f9892008d3fcdaf0/public/logo512.png -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "DeadHash", 3 | "name": "DeadHash", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /public/workers/FileWorker/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | File Worker Window 6 | 7 | 8 | 177 | 178 | 179 | -------------------------------------------------------------------------------- /public/workers/TextWorker/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Text Worker Window 6 | 7 | 8 | 148 | 149 | 150 | -------------------------------------------------------------------------------- /src/components/AlertDialog/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react'; 2 | import DialogTitle from '@mui/material/DialogTitle'; 3 | import DialogContent from '@mui/material/DialogContent'; 4 | import DialogContentText from '@mui/material/DialogContentText'; 5 | import DialogActions from '@mui/material/DialogActions'; 6 | import Button from '@mui/material/Button'; 7 | import Dialog from '@mui/material/Dialog'; 8 | 9 | const AlertDialog = ({ 10 | title, content, ok, onClose, 11 | }) => { 12 | const [open, setOpen] = useState(true); 13 | 14 | /** 15 | * Close the AlertDialog instance 16 | */ 17 | const handleClose = () => { 18 | setOpen(false); 19 | if (onClose) onClose(); 20 | }; 21 | 22 | return ( 23 | 29 | {title} 30 | 31 | 32 | {content} 33 | 34 | 35 | 36 | 39 | 40 | 41 | ); 42 | }; 43 | 44 | export default AlertDialog; 45 | -------------------------------------------------------------------------------- /src/components/App/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { useContext, useEffect } from 'react'; 2 | import { BrowserRouter, Routes, Route } from 'react-router-dom'; 3 | import { CssBaseline } from '@mui/material'; 4 | import { createTheme, ThemeProvider } from '@mui/material/styles'; 5 | import ThemeSelector from '../../utils/ThemeSelector'; 6 | import TopBar from '../TopBar'; 7 | import DropZone from '../DropZone'; 8 | import { MainContext } from '../../contexts/MainContextProvider'; 9 | import { CryptoContext } from '../../contexts/CryptoContextReducer'; 10 | import { 11 | setCurrentFile, 12 | setFileHashError, 13 | setFileHashes, 14 | setFileHashLoading, 15 | setTextHashError, 16 | setTextHashes, 17 | setTextHashLoading, 18 | } from '../../reducers/CryptoReducer/Actions'; 19 | import Text from '../../routes/Text'; 20 | import File from '../../routes/File'; 21 | import About from '../../routes/About'; 22 | import Settings from '../../routes/Settings'; 23 | 24 | const { ipcRenderer } = window.require('electron'); 25 | 26 | const App = () => { 27 | const [state] = useContext(MainContext); 28 | const [, dispatch] = useContext(CryptoContext); 29 | 30 | const enabled = state.canDragDrop; 31 | const { themeIndex, themeStyle } = state; 32 | 33 | const color = ThemeSelector(themeIndex); 34 | 35 | const theme = createTheme({ 36 | palette: { 37 | primary: color, 38 | mode: themeStyle, 39 | }, 40 | }); 41 | 42 | useEffect(() => { 43 | ipcRenderer.on('file-hash-calculated', (e, data) => { 44 | dispatch(setFileHashes(data)); 45 | dispatch(setFileHashLoading(false)); 46 | }); 47 | 48 | ipcRenderer.on('text-hash-calculated', (e, data) => { 49 | dispatch(setTextHashes(data)); 50 | dispatch(setTextHashLoading(false)); 51 | }); 52 | 53 | ipcRenderer.on('file-hash-calculation-error', (e, data) => { 54 | dispatch(setFileHashError(data.message)); 55 | dispatch(setFileHashLoading(false)); 56 | }); 57 | 58 | ipcRenderer.on('text-hash-calculation-error', (e, data) => { 59 | dispatch(setTextHashError(data.message)); 60 | dispatch(setTextHashLoading(false)); 61 | }); 62 | }, []); 63 | 64 | /** 65 | * Method that is called when a file is dropped 66 | * @param item The item that was dropped 67 | */ 68 | const onDrop = (item) => { 69 | dispatch(setCurrentFile(item)); 70 | }; 71 | 72 | return ( 73 | 74 | 75 | 76 | 77 | 78 | 79 | } /> 80 | } /> 81 | } /> 82 | } /> 83 | } /> 84 | } /> 85 | 86 | 87 | 88 | 89 | ); 90 | }; 91 | 92 | export default App; 93 | -------------------------------------------------------------------------------- /src/components/BackButton/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Button from '@mui/material/Button'; 3 | import ArrowLeftIcon from '@mui/icons-material/KeyboardArrowLeft'; 4 | import { useNavigate } from 'react-router-dom'; 5 | 6 | const BackButton = () => { 7 | const navigate = useNavigate(); 8 | /** 9 | * Call the goBack event 10 | * @param e The event argument 11 | */ 12 | const back = (e) => { 13 | if (e) e.preventDefault(); 14 | navigate(-1); 15 | }; 16 | 17 | return ( 18 | 24 | ); 25 | }; 26 | 27 | export default BackButton; 28 | -------------------------------------------------------------------------------- /src/components/CompareField/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import TextField from '@mui/material/TextField'; 3 | import CopyPasteMenu from '../CopyPasteMenu'; 4 | 5 | const CompareField = ({ 6 | copyLabel, pasteLabel, onPaste, compareLabel, value, onChange, 7 | }) => { 8 | /** 9 | * Paste data 10 | */ 11 | const paste = () => { 12 | if (onPaste) { 13 | onPaste(); 14 | } 15 | }; 16 | 17 | /** 18 | * Change the value 19 | * @param e The event argument 20 | */ 21 | const changeValue = (e) => { 22 | if (onChange) { 23 | onChange(e.target.value); 24 | } 25 | }; 26 | 27 | return ( 28 | navigator.clipboard.writeText(value)} 31 | copy={copyLabel} 32 | paste={pasteLabel} 33 | pasteData={paste} 34 | > 35 | 41 | 42 | ); 43 | }; 44 | 45 | export default CompareField; 46 | -------------------------------------------------------------------------------- /src/components/ConfirmationDialog/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Dialog from '@mui/material/Dialog'; 3 | import DialogTitle from '@mui/material/DialogTitle'; 4 | import DialogContent from '@mui/material/DialogContent'; 5 | import DialogContentText from '@mui/material/DialogContentText'; 6 | import DialogActions from '@mui/material/DialogActions'; 7 | import Button from '@mui/material/Button'; 8 | 9 | const ConfirmationDialog = ({ 10 | open, title, content, onAccept, onCancel, onClose, yes, no, 11 | }) => { 12 | /** 13 | * Close the AlertDialog instance 14 | */ 15 | const handleClose = () => { 16 | if (onClose) onClose(); 17 | }; 18 | 19 | /** 20 | * Accept the confirmation 21 | */ 22 | const accept = () => { 23 | if (onAccept) onAccept(); 24 | handleClose(); 25 | }; 26 | 27 | /** 28 | * Cancel the confirmation 29 | */ 30 | const cancel = () => { 31 | if (onCancel) onCancel(); 32 | handleClose(); 33 | }; 34 | 35 | return ( 36 | 42 | {title} 43 | 44 | 45 | {content} 46 | 47 | 48 | 49 | 52 | 55 | 56 | 57 | ); 58 | }; 59 | 60 | export default ConfirmationDialog; 61 | -------------------------------------------------------------------------------- /src/components/CopyPasteMenu/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Item, Menu, useContextMenu } from 'react-contexify'; 3 | import CopyIcon from '@mui/icons-material/FileCopy'; 4 | import PasteIcon from '@mui/icons-material/Assignment'; 5 | 6 | const CopyPasteMenu = ({ 7 | id, children, copyData, pasteData, copy, paste, 8 | }) => { 9 | const MENU_ID = `copyPasteMenu${id}`; 10 | 11 | const { show } = useContextMenu({ 12 | id: MENU_ID, 13 | }); 14 | 15 | /** 16 | * Handle the context menu event 17 | * @param event The event argument 18 | */ 19 | const handleContextMenu = (event) => { 20 | event.preventDefault(); 21 | show(event, { 22 | props: { 23 | key: 'value', 24 | }, 25 | }); 26 | }; 27 | 28 | return ( 29 | <> 30 |
34 | {children} 35 |
36 | 37 | copyData()}> 38 | 39 | {` ${copy}`} 40 | 41 | pasteData()}> 42 | 43 | {` ${paste}`} 44 | 45 | 46 | 47 | ); 48 | }; 49 | 50 | export default CopyPasteMenu; 51 | -------------------------------------------------------------------------------- /src/components/CryptographyMenu/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react'; 2 | import Collapse from '@mui/material/Collapse'; 3 | import ListItemIcon from '@mui/material/ListItemIcon'; 4 | import ListItemText from '@mui/material/ListItemText'; 5 | import List from '@mui/material/List'; 6 | import ExpandLessIcon from '@mui/icons-material/ExpandLess'; 7 | import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; 8 | import KeyIcon from '@mui/icons-material/VpnKey'; 9 | import ListItemButton from '@mui/material/ListItemButton'; 10 | import { useTheme } from '@mui/material'; 11 | 12 | const CryptographyMenu = ({ 13 | handleIndexChange, selectedIndex, cryptography, file, text, 14 | }) => { 15 | const theme = useTheme(); 16 | const [openCollapse, setOpenCollapse] = useState(true); 17 | 18 | /** 19 | * Open the menu 20 | */ 21 | const handleOpenMenu = () => { 22 | setOpenCollapse(!openCollapse); 23 | }; 24 | 25 | return ( 26 | 27 | 28 | 29 | 30 | {openCollapse ? 31 | : } 32 | 33 | 34 | 35 | handleIndexChange(1)} 41 | > 42 | 43 | 44 | handleIndexChange(2)} 50 | > 51 | 52 | 53 | 54 | 55 | 56 | ); 57 | }; 58 | 59 | export default CryptographyMenu; 60 | -------------------------------------------------------------------------------- /src/components/CsvExport/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const CsvExport = ({ children, data, fileName }) => { 4 | let href = null; 5 | if (data) { 6 | let csvContent = ''; 7 | data.forEach((element) => { 8 | csvContent += `${element.type},${element.hash}\n`; 9 | }); 10 | 11 | const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' }); 12 | href = URL.createObjectURL(blob); 13 | } 14 | 15 | return ( 16 | data ? ( 17 | 23 | {children} 24 | 25 | ) : { children } 26 | ); 27 | }; 28 | 29 | export default CsvExport; 30 | -------------------------------------------------------------------------------- /src/components/DrawerBar/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { useContext } from 'react'; 2 | import { useTheme } from '@mui/material/styles'; 3 | import Drawer from '@mui/material/Drawer'; 4 | import Box from '@mui/material/Box'; 5 | import List from '@mui/material/List'; 6 | import Divider from '@mui/material/Divider'; 7 | import IconButton from '@mui/material/IconButton'; 8 | import ChevronLeftIcon from '@mui/icons-material/ChevronLeft'; 9 | import ChevronRightIcon from '@mui/icons-material/ChevronRight'; 10 | import ListItemIcon from '@mui/material/ListItemIcon'; 11 | import ListItemText from '@mui/material/ListItemText'; 12 | import InfoIcon from '@mui/icons-material/Info'; 13 | import BuildIcon from '@mui/icons-material/Build'; 14 | import HelpIcon from '@mui/icons-material/Help'; 15 | import CloseIcon from '@mui/icons-material/Close'; 16 | import { useNavigate } from 'react-router-dom'; 17 | import ListItemButton from '@mui/material/ListItemButton'; 18 | import CryptographyMenu from '../CryptographyMenu'; 19 | import { MainContext } from '../../contexts/MainContextProvider'; 20 | 21 | const { ipcRenderer } = window.require('electron'); 22 | 23 | const DrawerBar = ({ open, onClose }) => { 24 | const [state] = useContext(MainContext); 25 | const language = state.languages[state.languageIndex]; 26 | const selectedItem = state.selectedListItem; 27 | 28 | const navigate = useNavigate(); 29 | const theme = useTheme(); 30 | 31 | /** 32 | * Function that is called when the drawer should close 33 | */ 34 | const handleDrawerClose = () => { 35 | onClose(); 36 | }; 37 | 38 | /** 39 | * Handle a page change 40 | * @param index The index of the page 41 | */ 42 | const handleIndexChange = (index) => { 43 | onClose(); 44 | if (selectedItem === index) return; 45 | 46 | switch (index) { 47 | case 1: 48 | navigate('/file'); 49 | break; 50 | case 2: 51 | navigate('/text'); 52 | break; 53 | case 3: 54 | navigate('/settings'); 55 | break; 56 | case 4: 57 | window.open('https://codedead.com/Software/DeadHash/help.pdf', '_blank'); 58 | break; 59 | case 5: 60 | navigate('/about'); 61 | break; 62 | default: 63 | navigate('/'); 64 | break; 65 | } 66 | }; 67 | 68 | return ( 69 | 74 | 83 | 84 | {theme.direction === 'ltr' ? : } 85 | 86 | 87 | 88 | 89 | 90 | 91 | 98 | 99 | 100 | 101 | 102 | handleIndexChange(3)} selected={selectedItem === 3}> 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | handleIndexChange(4)}> 112 | 113 | 114 | 115 | 116 | handleIndexChange(5)} selected={selectedItem === 5}> 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | ipcRenderer.send('handle-close')}> 126 | 127 | 128 | 129 | 130 | 131 | 132 | ); 133 | }; 134 | 135 | export default DrawerBar; 136 | -------------------------------------------------------------------------------- /src/components/DropZone/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { useNavigate } from 'react-router-dom'; 3 | 4 | const DropZone = ({ 5 | children, onDrop, enabled, reRoute, 6 | }) => { 7 | const navigate = useNavigate(); 8 | 9 | /** 10 | * Event that is fired when one or more files are dropped 11 | * @param e The event that contains the drop details 12 | */ 13 | const drop = (e) => { 14 | if (e) e.preventDefault(); 15 | if (!enabled) return; 16 | 17 | if (onDrop) onDrop(e.dataTransfer.files[0]); 18 | if (reRoute) navigate(reRoute); 19 | }; 20 | 21 | /** 22 | * Event that is fired when a drag over event is detected 23 | * @param event The event that contains the drag over details 24 | */ 25 | const onDragOver = (event) => { 26 | event.preventDefault(); 27 | }; 28 | 29 | return ( 30 |
34 | {children} 35 |
36 | ); 37 | }; 38 | 39 | export default DropZone; 40 | -------------------------------------------------------------------------------- /src/components/GridList/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Grid from '@mui/material/Grid'; 3 | 4 | const GridList = ({ 5 | spacing, children, xs, md, lg, 6 | }) => ( 7 | 8 | {children.map((e, i) => ( 9 | // eslint-disable-next-line react/no-array-index-key 10 | 11 | {e} 12 | 13 | ))} 14 | 15 | ); 16 | 17 | export default GridList; 18 | -------------------------------------------------------------------------------- /src/components/Hash/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Typography from '@mui/material/Typography'; 3 | import CheckIcon from '@mui/icons-material/Check'; 4 | import CopyIcon from '@mui/icons-material/FileCopy'; 5 | import { Menu, Item, useContextMenu } from 'react-contexify'; 6 | import 'react-contexify/dist/ReactContexify.min.css'; 7 | import Card from '@mui/material/Card'; 8 | import CardContent from '@mui/material/CardContent'; 9 | 10 | const Hash = ({ 11 | hashType, content, compareString, id, copy, 12 | }) => { 13 | const MENU_ID = `hashMenu${id}`; 14 | 15 | let compareColor = null; 16 | let compareIcon = null; 17 | if (compareString && compareString === content) { 18 | compareIcon = ; 19 | compareColor = { color: 'green' }; 20 | } 21 | 22 | const { show } = useContextMenu({ 23 | id: MENU_ID, 24 | }); 25 | 26 | /** 27 | * Handle the context menu event 28 | * @param event The event argument 29 | */ 30 | const handleContextMenu = (event) => { 31 | event.preventDefault(); 32 | show(event, { 33 | props: { 34 | key: 'value', 35 | }, 36 | }); 37 | }; 38 | 39 | return ( 40 | 41 | 42 | 43 | {hashType} 44 | {compareIcon} 45 | 46 |
47 | {content} 48 |
49 | 50 | navigator.clipboard.writeText(content)}> 51 | 52 | {' '} 53 | {copy} 54 | 55 | 56 |
57 |
58 | ); 59 | }; 60 | 61 | export default Hash; 62 | -------------------------------------------------------------------------------- /src/components/HashList/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Typography from '@mui/material/Typography'; 3 | import Box from '@mui/material/Box'; 4 | import GridList from '../GridList'; 5 | import Hash from '../Hash'; 6 | 7 | const HashList = ({ 8 | outputLabel, hashes, marginTop, copyLabel, compareHash, 9 | }) => ( 10 | 11 | 12 | {outputLabel} 13 | 14 | 15 | {hashes.map((e, i) => ( 16 | 24 | ))} 25 | 26 | 27 | ); 28 | 29 | export default HashList; 30 | -------------------------------------------------------------------------------- /src/components/LoadingBar/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import CircularProgress from '@mui/material/CircularProgress'; 3 | 4 | const LoadingBar = ({ marginTop }) => ( 5 |
11 | 12 |
13 | ); 14 | 15 | export default LoadingBar; 16 | -------------------------------------------------------------------------------- /src/components/PageHeader/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Container from '@mui/material/Container'; 3 | import Typography from '@mui/material/Typography'; 4 | import Box from '@mui/material/Box'; 5 | import { useTheme } from '@mui/material/styles'; 6 | import BackButton from '../BackButton'; 7 | 8 | const PageHeader = ({ title, subtitle, backButton }) => { 9 | const theme = useTheme(); 10 | 11 | return ( 12 | 18 | 19 | 20 | {backButton ? : null} 21 | {title} 22 | 23 | 24 | {subtitle} 25 | 26 | 27 | 28 | ); 29 | }; 30 | 31 | export default PageHeader; 32 | -------------------------------------------------------------------------------- /src/components/Theme/blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeDead/DeadHash-js/8a704ba923be066377f61b38f9892008d3fcdaf0/src/components/Theme/blank.png -------------------------------------------------------------------------------- /src/components/Theme/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Card from '@mui/material/Card'; 3 | import CardActionArea from '@mui/material/CardActionArea'; 4 | import CardContent from '@mui/material/CardContent'; 5 | import CardMedia from '@mui/material/CardMedia'; 6 | import Typography from '@mui/material/Typography'; 7 | import blank from './blank.png'; 8 | 9 | const Theme = ({ 10 | title, description, color, selected, onAction, 11 | }) => { 12 | const action = onAction || null; 13 | 14 | return ( 15 | 16 | 17 | 25 | 26 | 27 | {title} 28 | 29 | 30 | {description} 31 | 32 | 33 | 34 | 35 | ); 36 | }; 37 | 38 | export default Theme; 39 | -------------------------------------------------------------------------------- /src/components/TopBar/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect, useContext } from 'react'; 2 | import AppBar from '@mui/material/AppBar'; 3 | import Toolbar from '@mui/material/Toolbar'; 4 | import Typography from '@mui/material/Typography'; 5 | import LanguageIcon from '@mui/icons-material/Language'; 6 | import IconButton from '@mui/material/IconButton'; 7 | import MenuIcon from '@mui/icons-material/Menu'; 8 | import Menu from '@mui/material/Menu'; 9 | import MenuItem from '@mui/material/MenuItem'; 10 | import CloseIcon from '@mui/icons-material/Close'; 11 | import Brightness5Icon from '@mui/icons-material/Brightness5'; 12 | import Brightness7Icon from '@mui/icons-material/Brightness7'; 13 | import MinimizeIcon from '@mui/icons-material/Minimize'; 14 | import FullScreenIcon from '@mui/icons-material/Fullscreen'; 15 | import FullscreenExitIcon from '@mui/icons-material/FullscreenExit'; 16 | import Box from '@mui/material/Box'; 17 | import DrawerBar from '../DrawerBar'; 18 | import { setLanguageIndex, setThemeStyle } from '../../reducers/MainReducer/Actions'; 19 | import { MainContext } from '../../contexts/MainContextProvider'; 20 | 21 | const { ipcRenderer } = window.require('electron'); 22 | 23 | const TopBar = () => { 24 | const [state, d1] = useContext(MainContext); 25 | 26 | const { 27 | languageIndex, 28 | minimizeEnabled, 29 | maximizeEnabled, 30 | languageEnabled, 31 | themeStyle, 32 | themeToggleEnabled, 33 | } = state; 34 | const language = state.languages[languageIndex]; 35 | 36 | const [anchorEl, setAnchorEl] = useState(null); 37 | const [fullScreen, setFullScreen] = useState(false); 38 | const [drawerOpen, setDrawerOpen] = useState(false); 39 | const languageOpen = Boolean(anchorEl); 40 | 41 | /** 42 | * Set full screen to true 43 | */ 44 | const fullScreenEvent = () => { 45 | setFullScreen(true); 46 | }; 47 | 48 | /** 49 | * Set fullscreen to false 50 | */ 51 | const exitFullScreenEvent = () => { 52 | setFullScreen(false); 53 | }; 54 | 55 | useEffect(() => { 56 | ipcRenderer.on('window-maximized', fullScreenEvent); 57 | ipcRenderer.on('window-unmaximized', exitFullScreenEvent); 58 | }, []); 59 | 60 | /** 61 | * Open the drawer 62 | */ 63 | const openDrawer = () => { 64 | setDrawerOpen(true); 65 | }; 66 | 67 | /** 68 | * Handle the closing of the top bar 69 | */ 70 | const handleClose = () => { 71 | setAnchorEl(null); 72 | }; 73 | 74 | /** 75 | * Change the language of the application 76 | * @param lang The language index 77 | */ 78 | const changeLanguage = (lang) => { 79 | handleClose(); 80 | d1(setLanguageIndex(lang)); 81 | }; 82 | 83 | /** 84 | * Handle menu event 85 | * @param event The event of the menu 86 | */ 87 | const handleMenu = (event) => { 88 | setAnchorEl(event.currentTarget); 89 | }; 90 | 91 | /** 92 | * Minimize the window 93 | */ 94 | const minimize = () => { 95 | ipcRenderer.send('handle-minimize'); 96 | }; 97 | 98 | /** 99 | * Maximize or restore the previous state of the window 100 | */ 101 | const maximize = () => { 102 | ipcRenderer.send('handle-maximize'); 103 | }; 104 | 105 | /** 106 | * Change the theme style 107 | */ 108 | const changeThemeStyle = () => { 109 | d1(setThemeStyle(themeStyle === 'dark' ? 'light' : 'dark')); 110 | }; 111 | 112 | return ( 113 | 114 | 117 | 120 | 126 | 127 | 128 | 135 | {language.appName} 136 | 137 | 138 | {themeToggleEnabled ? ( 139 | 140 | {themeStyle === 'dark' ? : } 141 | 142 | ) : null} 143 | 144 | {languageEnabled 145 | ? ( 146 |
147 | 153 | 154 | 155 | 170 | 171 | changeLanguage(0)} 173 | selected={languageIndex === 0} 174 | > 175 | Deutsch 176 | 177 | changeLanguage(1)} 179 | selected={languageIndex === 1} 180 | > 181 | English 182 | 183 | changeLanguage(2)} 185 | selected={languageIndex === 2} 186 | > 187 | Español 188 | 189 | changeLanguage(3)} 191 | selected={languageIndex === 3} 192 | > 193 | Français 194 | 195 | changeLanguage(4)} 197 | selected={languageIndex === 4} 198 | > 199 | Italiano 200 | 201 | changeLanguage(5)} 203 | selected={languageIndex === 5} 204 | > 205 | 日本語 206 | 207 | changeLanguage(6)} 209 | selected={languageIndex === 6} 210 | > 211 | Nederlands 212 | 213 | changeLanguage(7)} 215 | selected={languageIndex === 7} 216 | > 217 | Português 218 | 219 | changeLanguage(8)} 221 | selected={languageIndex === 8} 222 | > 223 | Pусский 224 | 225 | changeLanguage(9)} 227 | selected={languageIndex === 9} 228 | > 229 | Türkçe 230 | 231 | 232 |
233 | ) 234 | : null} 235 | {minimizeEnabled 236 | ? ( 237 | minimize()} 240 | > 241 | 242 | 243 | ) 244 | : null} 245 | {maximizeEnabled 246 | ? ( 247 | maximize()} 250 | > 251 | {fullScreen ? : } 252 | 253 | ) 254 | : null} 255 | ipcRenderer.send('handle-close')} 258 | > 259 | 260 | 261 |
262 |
263 | setDrawerOpen(false)} /> 264 | 265 |
266 | ); 267 | }; 268 | 269 | export default TopBar; 270 | -------------------------------------------------------------------------------- /src/components/UpdateDialog/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react'; 2 | import Dialog from '@mui/material/Dialog'; 3 | import DialogActions from '@mui/material/DialogActions'; 4 | import DialogContent from '@mui/material/DialogContent'; 5 | import DialogContentText from '@mui/material/DialogContentText'; 6 | import DialogTitle from '@mui/material/DialogTitle'; 7 | import Button from '@mui/material/Button'; 8 | 9 | const UpdateDialog = ({ 10 | downloadUrl, infoUrl, newVersion, updateAvailable, newVersionText, information, download, cancel, 11 | }) => { 12 | const [open, setOpen] = useState(true); 13 | 14 | /** 15 | * Close the UpdateDialog instance 16 | */ 17 | const handleClose = () => { 18 | setOpen(false); 19 | }; 20 | 21 | /** 22 | * Open the information page 23 | */ 24 | const openInformation = () => { 25 | window.open(infoUrl, '_blank'); 26 | }; 27 | 28 | /** 29 | * Open the download page 30 | */ 31 | const openDownload = () => { 32 | window.open(downloadUrl, '_blank'); 33 | handleClose(); 34 | }; 35 | 36 | return ( 37 | 43 | {updateAvailable} 44 | 45 | 46 | {newVersionText.replace('{x}', newVersion)} 47 | 48 | 49 | 50 | 53 | 56 | 59 | 60 | 61 | ); 62 | }; 63 | 64 | export default UpdateDialog; 65 | -------------------------------------------------------------------------------- /src/contexts/CryptoContextReducer/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { createContext, useReducer } from 'react'; 2 | import CryptoReducer from '../../reducers/CryptoReducer'; 3 | 4 | const md4 = localStorage.md4 && localStorage.md4 === 'true' ? true : !localStorage.md4; 5 | const md5 = localStorage.md5 && localStorage.md5 === 'true' ? true : !localStorage.md5; 6 | const sha1 = localStorage.sha1 && localStorage.sha1 === 'true' ? true : !localStorage.sha1; 7 | const sha224 = localStorage.sha224 && localStorage.sha224 === 'true' ? true : !localStorage.sha224; 8 | const sha256 = localStorage.sha256 && localStorage.sha256 === 'true' ? true : !localStorage.sha256; 9 | const sha384 = localStorage.sha384 && localStorage.sha384 === 'true' ? true : !localStorage.sha384; 10 | const sha512 = localStorage.sha512 && localStorage.sha512 === 'true' ? true : !localStorage.sha512; 11 | const ripemd160 = localStorage.ripemd160 && localStorage.ripemd160 === 'true' ? true : !localStorage.ripemd160; 12 | const crc1 = !!(localStorage.crc1 && localStorage.crc1 === 'true'); 13 | const crc8 = !!(localStorage.crc8 && localStorage.crc8 === 'true'); 14 | const crc16 = !!(localStorage.crc16 && localStorage.crc16 === 'true'); 15 | const crc24 = !!(localStorage.crc24 && localStorage.crc24 === 'true'); 16 | const crc32 = localStorage.crc32 && localStorage.crc32 === 'true' ? true : !localStorage.crc32; 17 | 18 | const initState = { 19 | md4, 20 | md5, 21 | sha1, 22 | sha224, 23 | sha256, 24 | sha384, 25 | sha512, 26 | ripemd160, 27 | crc1, 28 | crc8, 29 | crc16, 30 | crc24, 31 | crc32, 32 | fileHashes: null, 33 | textHashes: null, 34 | textInput: '', 35 | currentFile: null, 36 | fileComparing: false, 37 | fileCompareHash: '', 38 | fileHashLoading: false, 39 | textComparing: false, 40 | textCompareHash: '', 41 | textHashLoading: false, 42 | textErrorMessage: null, 43 | fileErrorMessage: null, 44 | }; 45 | 46 | export const CryptoContext = createContext(initState); 47 | 48 | const CryptoContextProvider = ({ children }) => { 49 | const [state, dispatch] = useReducer(CryptoReducer, initState); 50 | 51 | return ( 52 | // eslint-disable-next-line react/jsx-no-constructed-context-values 53 | 54 | {children} 55 | 56 | ); 57 | }; 58 | 59 | export default CryptoContextProvider; 60 | -------------------------------------------------------------------------------- /src/contexts/MainContextProvider/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { createContext, useReducer } from 'react'; 2 | import MainReducer from '../../reducers/MainReducer'; 3 | // eslint-disable-next-line camelcase 4 | import de_DE from '../../languages/de_DE'; 5 | // eslint-disable-next-line camelcase 6 | import en_US from '../../languages/en_US'; 7 | // eslint-disable-next-line camelcase 8 | import es_ES from '../../languages/es_ES'; 9 | // eslint-disable-next-line camelcase 10 | import fr_FR from '../../languages/fr_FR'; 11 | // eslint-disable-next-line camelcase 12 | import it_IT from '../../languages/it_IT'; 13 | // eslint-disable-next-line camelcase 14 | import jp_JP from '../../languages/jp_JP'; 15 | // eslint-disable-next-line camelcase 16 | import nl_NL from '../../languages/nl_NL'; 17 | // eslint-disable-next-line camelcase 18 | import pt_PT from '../../languages/pt_PT'; 19 | // eslint-disable-next-line camelcase 20 | import ru_RU from '../../languages/ru_RU'; 21 | // eslint-disable-next-line camelcase 22 | import tr_TR from '../../languages/tr_TR'; 23 | 24 | const languageIndex = localStorage.languageIndex ? parseFloat(localStorage.languageIndex) : 1; 25 | const themeStyle = localStorage.themeStyle ? localStorage.themeStyle : 'light'; 26 | const themeIndex = localStorage.themeIndex ? parseFloat(localStorage.themeIndex) : 0; 27 | const autoUpdate = localStorage.autoUpdate && localStorage.autoUpdate === 'true' ? true : !localStorage.autoUpdate; 28 | const minimizeEnabled = localStorage.minimizeEnabled && localStorage.minimizeEnabled === 'true' ? true : !localStorage.minimizeEnabled; 29 | const maximizeEnabled = localStorage.maximizeEnabled && localStorage.maximizeEnabled === 'true' ? true : !localStorage.maximizeEnabled; 30 | const languageEnabled = !!(localStorage.languageEnabled && localStorage.languageEnabled === 'true'); 31 | const themeToggleEnabled = !!(localStorage.themeToggleEnabled && localStorage.themeToggleEnabled === 'true'); 32 | const canDragDrop = localStorage.canDragDrop && localStorage.canDragDrop === 'true' ? true : !localStorage.canDragDrop; 33 | 34 | const initState = { 35 | languageIndex, 36 | languages: [ 37 | de_DE(), 38 | en_US(), 39 | es_ES(), 40 | fr_FR(), 41 | it_IT(), 42 | jp_JP(), 43 | nl_NL(), 44 | pt_PT(), 45 | ru_RU(), 46 | tr_TR(), 47 | ], 48 | drawerOpen: false, 49 | selectedListItem: 0, 50 | themeStyle, 51 | themeIndex, 52 | autoUpdate, 53 | checkedForUpdates: false, 54 | minimizeEnabled, 55 | maximizeEnabled, 56 | languageEnabled, 57 | themeToggleEnabled, 58 | canDragDrop, 59 | }; 60 | 61 | export const MainContext = createContext(initState); 62 | 63 | const MainContextProvider = ({ children }) => { 64 | const [state, dispatch] = useReducer(MainReducer, initState); 65 | 66 | return ( 67 | // eslint-disable-next-line react/jsx-no-constructed-context-values 68 | 69 | {children} 70 | 71 | ); 72 | }; 73 | 74 | export default MainContextProvider; 75 | -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 4 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /src/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { createRoot } from 'react-dom/client'; 3 | import './index.css'; 4 | import App from './components/App'; 5 | import MainContextProvider from './contexts/MainContextProvider'; 6 | import CryptoContextProvider from './contexts/CryptoContextReducer'; 7 | 8 | const container = document.getElementById('root'); 9 | const root = createRoot(container); 10 | root.render( 11 | 12 | 13 | 14 | 15 | , 16 | ); 17 | -------------------------------------------------------------------------------- /src/languages/de_DE/index.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line camelcase 2 | const de_DE = () => ({ 3 | appName: 'DeadHash', 4 | about: 'Über', 5 | settings: 'Einstellungen', 6 | settingsSubtitle: 'Deine Präferenzen', 7 | help: 'Hilfe', 8 | language: 'Sprache', 9 | aboutSubtitle: 'Erfahren Sie mehr über DeadHash', 10 | aboutMessage: 'DeadHash wurde von DeadLine erstellt.\n\nEinige Bilder wurden von icons8 bereitgestellt: https://icons8.com\nLizenz: GPLv3\nVersion: {x}\n\nCopyright © 2022 CodeDead', 11 | codedead: 'CodeDead', 12 | theme: 'Thema', 13 | general: 'Allgemeines', 14 | autoUpdate: 'Automatisch nach Aktualisierungen suchen', 15 | dragAndDrop: 'Aktivieren Sie Drag & Drop', 16 | select: 'Wählen', 17 | default: 'Standard', 18 | defaultThemeDescription: 'Das Standarddesign.', 19 | lightBlue: 'Hellblau', 20 | lightBlueDescription: 'Leicht anzufassen.', 21 | red: 'Rot', 22 | redDescription: 'Halte es kantig.', 23 | green: 'Grün', 24 | greenDescription: 'Die Natur ist am schönsten.', 25 | lightGreen: 'Hellgrün', 26 | lightGreenDescription: 'Das Gras ist immer grüner.', 27 | purple: 'Lila', 28 | purpleDescription: 'Amethyst.', 29 | deepPurple: 'Dunkellila', 30 | deepPurpleDescription: 'Für den Fall, dass lila nicht genug war.', 31 | grey: 'Grau', 32 | greyDescription: 'Warte nicht auf dich.', 33 | cryptography: 'Kryptographie', 34 | cryptographySubtitle: '#', 35 | md4: 'MD4', 36 | md5: 'MD5', 37 | sha1: 'SHA-1', 38 | sha256: 'SHA-256', 39 | sha384: 'SHA-384', 40 | sha512: 'SHA-512', 41 | ripemd160: 'RIPEMD-160', 42 | sha224: 'SHA-224', 43 | crc1: 'CRC1', 44 | crc8: 'CRC8', 45 | crc16: 'CRC16', 46 | crc24: 'CRC24', 47 | crc32: 'CRC32', 48 | file: 'Datei', 49 | fileSubtitle: 'Berechnen Sie Datei-Hashes', 50 | text: 'Text', 51 | textSubtitle: 'Berechnen Sie Text-Hashes', 52 | license: 'Lizenz', 53 | download: 'Herunterladen', 54 | cancel: 'Stornieren', 55 | ok: 'OK', 56 | errorTitle: 'Ein Fehler ist aufgetreten!', 57 | compare: 'Vergleichen', 58 | compareHash: 'Dein Hash hier', 59 | calculate: 'Berechnung', 60 | output: 'Ausgabe', 61 | copy: 'Kopieren', 62 | paste: 'Einfügen', 63 | clear: 'Löschen', 64 | reset: 'Zurücksetzen', 65 | updateAvailable: 'Update verfügbar!', 66 | information: 'Information', 67 | newVersion: 'Version {x} ist jetzt verfügbar. Möchten Sie diese Version herunterladen?', 68 | checkForUpdates: 'Auf Updates prüfen', 69 | noUpdatesTitle: 'Keine Updates verfügbar!', 70 | noUpdatesMessage: 'Sie verwenden die neueste Version von DeadHash.', 71 | minimizeEnabled: 'Schaltfläche "Minimieren"', 72 | maximizeEnabled: 'Schaltfläche "Maximieren"', 73 | languageEnabled: 'Schaltfläche "Sprache"', 74 | exit: 'Schließen', 75 | export: 'Export', 76 | yourTextHere: 'Dein Text hier', 77 | filePath: 'Dateipfad', 78 | yes: 'Ja', 79 | no: 'Nein', 80 | confirmation: 'Bestätigung', 81 | confirmResetSettings: 'Möchten Sie wirklich alle Einstellungen zurücksetzen?', 82 | themeStyle: 'Themenstil', 83 | light: 'Licht', 84 | dark: 'Dunkel', 85 | orange: 'Orange', 86 | orangeThemeDescription: 'Lass uns Niederländisch werden.', 87 | themeToggleEnabled: 'Thema umschalten', 88 | cyclicRedundancyCheck: 'Zyklische Redundanzprüfung', 89 | deepOrange: 'Tiefes Orange', 90 | deepOrangeDescription: 'Für den Fall, dass Orange nicht genug war.', 91 | amber: 'Amber', 92 | amberDescription: 'Nicht selektives Gelb.', 93 | brown: 'Braun', 94 | brownDescription: 'Besser als ein Brownout.', 95 | }); 96 | 97 | // eslint-disable-next-line camelcase 98 | export default de_DE; 99 | -------------------------------------------------------------------------------- /src/languages/en_US/index.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line camelcase 2 | const en_US = () => ({ 3 | appName: 'DeadHash', 4 | about: 'About', 5 | settings: 'Settings', 6 | settingsSubtitle: 'Your preferences', 7 | help: 'Help', 8 | language: 'Language', 9 | aboutSubtitle: 'Learn more about DeadHash', 10 | aboutMessage: 'DeadHash was created by DeadLine.\n\nSome images were provided by icons8: https://icons8.com\nLicense: GPLv3\nVersion: {x}\n\nCopyright © 2022 CodeDead', 11 | codedead: 'CodeDead', 12 | theme: 'Theme', 13 | general: 'General', 14 | autoUpdate: 'Automatically check for updates', 15 | dragAndDrop: 'Enable drag-and-drop', 16 | select: 'Select', 17 | default: 'Default', 18 | defaultThemeDescription: 'The default theme.', 19 | lightBlue: 'Light blue', 20 | lightBlueDescription: 'Light to the touch.', 21 | red: 'Red', 22 | redDescription: 'Keeping it edgy.', 23 | green: 'Green', 24 | greenDescription: 'Nature\'s finest.', 25 | lightGreen: 'Light green', 26 | lightGreenDescription: 'The grass is always greener.', 27 | purple: 'Purple', 28 | purpleDescription: 'Amethyst.', 29 | deepPurple: 'Deep purple', 30 | deepPurpleDescription: 'In case purple wasn\'t enough.', 31 | grey: 'Grey', 32 | greyDescription: 'Don\'t wait up.', 33 | cryptography: 'Cryptography', 34 | cryptographySubtitle: '#', 35 | md4: 'MD4', 36 | md5: 'MD5', 37 | sha1: 'SHA-1', 38 | sha256: 'SHA-256', 39 | sha384: 'SHA-384', 40 | sha512: 'SHA-512', 41 | ripemd160: 'RIPEMD-160', 42 | sha224: 'SHA-224', 43 | crc1: 'CRC1', 44 | crc8: 'CRC8', 45 | crc16: 'CRC16', 46 | crc24: 'CRC24', 47 | crc32: 'CRC32', 48 | file: 'File', 49 | fileSubtitle: 'Calculate file hashes', 50 | text: 'Text', 51 | textSubtitle: 'Calculate text hashes', 52 | license: 'License', 53 | download: 'Download', 54 | cancel: 'Cancel', 55 | ok: 'OK', 56 | errorTitle: 'An error occurred!', 57 | compare: 'Compare', 58 | compareHash: 'Your hash here', 59 | calculate: 'Calculate', 60 | output: 'Output', 61 | copy: 'Copy', 62 | paste: 'Paste', 63 | clear: 'Clear', 64 | reset: 'Reset', 65 | updateAvailable: 'Update available!', 66 | information: 'Information', 67 | newVersion: 'Version {x} is now available. Would you like to download this version?', 68 | checkForUpdates: 'Check for updates', 69 | noUpdatesTitle: 'No updates available!', 70 | noUpdatesMessage: 'You are using the latest version of DeadHash.', 71 | minimizeEnabled: 'Minimize button', 72 | maximizeEnabled: 'Maximize button', 73 | languageEnabled: 'Language button', 74 | exit: 'Exit', 75 | export: 'Export', 76 | yourTextHere: 'Your text here', 77 | filePath: 'File path', 78 | yes: 'Yes', 79 | no: 'No', 80 | confirmation: 'Confirmation', 81 | confirmResetSettings: 'Are you sure you want to reset all settings?', 82 | themeStyle: 'Theme style', 83 | light: 'Light', 84 | dark: 'Dark', 85 | orange: 'Orange', 86 | orangeThemeDescription: 'Let\'s get Dutch.', 87 | themeToggleEnabled: 'Theme toggle', 88 | cyclicRedundancyCheck: 'Cyclic redundancy check', 89 | deepOrange: 'Deep orange', 90 | deepOrangeDescription: 'In case orange wasn\'t enough.', 91 | amber: 'Amber', 92 | amberDescription: 'Not selective yellow.', 93 | brown: 'Brown', 94 | brownDescription: 'Better than a brownout.', 95 | }); 96 | 97 | // eslint-disable-next-line camelcase 98 | export default en_US; 99 | -------------------------------------------------------------------------------- /src/languages/es_ES/index.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line camelcase 2 | const es_ES = () => ({ 3 | appName: 'DeadHash', 4 | about: 'Sobre', 5 | settings: 'Configuraciones', 6 | settingsSubtitle: 'Tus preferencias', 7 | help: 'Ayuda', 8 | language: 'Idioma', 9 | aboutSubtitle: 'Obtenga más información sobre DeadHash', 10 | aboutMessage: 'DeadHash fue creado por DeadLine.\n\nAlgunas imágenes fueron proporcionadas por icons8: https://icons8.com\nLicencia: GPLv3\nVersión: {x}\n\nCopyright © 2022 CodeDead', 11 | codedead: 'CodeDead', 12 | theme: 'Tema', 13 | general: 'General', 14 | autoUpdate: 'Buscar actualizaciones automáticamente', 15 | dragAndDrop: 'Habilitar arrastrar y soltar', 16 | select: 'Seleccione', 17 | default: 'Defecto', 18 | defaultThemeDescription: 'El tema por defecto.', 19 | lightBlue: 'Azul claro', 20 | lightBlueDescription: 'Ligero al tacto.', 21 | red: 'Rojo', 22 | redDescription: 'Manteniéndolo nervioso.', 23 | green: 'Verde', 24 | greenDescription: 'La mejor de la naturaleza.', 25 | lightGreen: 'Verde claro', 26 | lightGreenDescription: 'La hierba es siempre mas verde.', 27 | purple: 'Púrpura', 28 | purpleDescription: 'Amatista.', 29 | deepPurple: 'Morado oscuro', 30 | deepPurpleDescription: 'En caso de que el púrpura no fuera suficiente.', 31 | grey: 'Gris', 32 | greyDescription: 'No esperes despierto.', 33 | cryptography: 'Criptografía', 34 | cryptographySubtitle: '#', 35 | md4: 'MD4', 36 | md5: 'MD5', 37 | sha1: 'SHA-1', 38 | sha256: 'SHA-256', 39 | sha384: 'SHA-384', 40 | sha512: 'SHA-512', 41 | ripemd160: 'RIPEMD-160', 42 | sha224: 'SHA-224', 43 | crc1: 'CRC1', 44 | crc8: 'CRC8', 45 | crc16: 'CRC16', 46 | crc24: 'CRC24', 47 | crc32: 'CRC32', 48 | file: 'Archivo', 49 | fileSubtitle: 'Calcular hashes de archivos', 50 | text: 'Texto', 51 | textSubtitle: 'Calcular hashes de texto', 52 | license: 'Licencia', 53 | download: 'Descargar', 54 | cancel: 'Cancelar', 55 | ok: 'Bueno', 56 | errorTitle: '¡Ocurrió un error!', 57 | compare: 'Comparar', 58 | compareHash: 'Tu hash aquí', 59 | calculate: 'Calcular', 60 | output: 'Salida', 61 | copy: 'Copiar', 62 | paste: 'Pegar', 63 | clear: 'Claro', 64 | reset: 'Reiniciar', 65 | updateAvailable: '¡Actualización disponible!', 66 | information: 'Información', 67 | newVersion: 'La versión {x} ya está disponible. ¿Desea descargar esta versión?', 68 | checkForUpdates: 'Buscar actualizaciones', 69 | noUpdatesTitle: '¡No hay actualizaciones disponibles!', 70 | noUpdatesMessage: 'Estás utilizando la última versión de DeadHash.', 71 | minimizeEnabled: 'Botón Minimizar', 72 | maximizeEnabled: 'Botón Maximizar', 73 | languageEnabled: 'Botón de idioma', 74 | exit: 'Salida', 75 | export: 'Exportar', 76 | yourTextHere: 'Tu texto aqui', 77 | filePath: 'Ruta de archivo', 78 | yes: 'Sí', 79 | no: 'No', 80 | confirmation: 'Confirmación', 81 | confirmResetSettings: '¿Estás seguro de que quieres restablecer todos los ajustes?', 82 | themeStyle: 'Estilo del tema', 83 | light: 'Ligero', 84 | dark: 'Oscuro', 85 | orange: 'Naranja', 86 | orangeThemeDescription: 'Vamos a holandeses.', 87 | themeToggleEnabled: 'Alternar tema', 88 | cyclicRedundancyCheck: 'Verificación de redundancia cíclica', 89 | deepOrange: 'Naranja intenso', 90 | deepOrangeDescription: 'En caso de que el naranja no fuera suficiente.', 91 | amber: 'Ámbar', 92 | amberDescription: 'No selectivo amarillo.', 93 | brown: 'Marrón', 94 | brownDescription: 'Mejor que un apagón.', 95 | }); 96 | 97 | // eslint-disable-next-line camelcase 98 | export default es_ES; 99 | -------------------------------------------------------------------------------- /src/languages/fr_FR/index.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line camelcase 2 | const fr_FR = () => ({ 3 | appName: 'DeadHash', 4 | about: 'À propos', 5 | settings: 'Paramètres', 6 | settingsSubtitle: 'Vos préférences', 7 | help: 'Aide', 8 | language: 'Langue', 9 | aboutSubtitle: 'En savoir plus sur DeadHash', 10 | aboutMessage: 'DeadHash a été créé par DeadLine.\n\nCertaines images ont été fournies par icons8: https://icons8.com\nLicence: GPLv3\nVersion: {x}\n\nCopyright © 2022 CodeDead', 11 | codedead: 'CodeDead', 12 | theme: 'Thème', 13 | general: 'Général', 14 | autoUpdate: 'Vérifier automatiquement les mises à jour', 15 | dragAndDrop: 'Activer le glisser-déposer', 16 | select: 'Sélectionner', 17 | default: 'Défaut', 18 | defaultThemeDescription: 'Le thème par défaut.', 19 | lightBlue: 'Bleu clair', 20 | lightBlueDescription: 'Légère au toucher.', 21 | red: 'Rouge', 22 | redDescription: 'Gardez-le énervé.', 23 | green: 'Vert', 24 | greenDescription: 'Le meilleur de la nature.', 25 | lightGreen: 'Vert clair', 26 | lightGreenDescription: 'L\'herbe est toujours plus verte.', 27 | purple: 'Violet', 28 | purpleDescription: 'Améthyste.', 29 | deepPurple: 'Violet foncé', 30 | deepPurpleDescription: 'Au cas où le violet ne suffirait pas.', 31 | grey: 'Gris', 32 | greyDescription: 'N\'attendez pas.', 33 | cryptography: 'Cryptographie', 34 | cryptographySubtitle: '#', 35 | md4: 'MD4', 36 | md5: 'MD5', 37 | sha1: 'SHA-1', 38 | sha256: 'SHA-256', 39 | sha384: 'SHA-384', 40 | sha512: 'SHA-512', 41 | ripemd160: 'RIPEMD-160', 42 | sha224: 'SHA-224', 43 | crc1: 'CRC1', 44 | crc8: 'CRC8', 45 | crc16: 'CRC16', 46 | crc24: 'CRC24', 47 | crc32: 'CRC32', 48 | file: 'File', 49 | fileSubtitle: 'Calculer les hachages de fichier', 50 | text: 'Texte', 51 | textSubtitle: 'Calculer les hachages de texte', 52 | license: 'Licence', 53 | download: 'Télécharger', 54 | cancel: 'Annuler', 55 | ok: 'OK', 56 | errorTitle: 'Une erreur est survenue!', 57 | compare: 'Comparer', 58 | compareHash: 'Votre hachage ici', 59 | calculate: 'Calculer', 60 | output: 'Résultat', 61 | copy: 'Copie', 62 | paste: 'Coller', 63 | clear: 'Clair', 64 | reset: 'Réinitialiser', 65 | updateAvailable: 'Mise à jour disponible!', 66 | information: 'Information', 67 | newVersion: 'Version {x} est maintenant disponible. Souhaitez-vous télécharger cette version?', 68 | checkForUpdates: 'Vérifier les mises à jour', 69 | noUpdatesTitle: 'Aucune mise à jour disponible!', 70 | noUpdatesMessage: 'Vous utilisez la dernière version de DeadHash.', 71 | minimizeEnabled: 'Bouton Réduire', 72 | maximizeEnabled: 'Bouton Agrandir', 73 | languageEnabled: 'Bouton de langue', 74 | exit: 'Fermer', 75 | export: 'Exporter', 76 | yourTextHere: 'Votre texte ici', 77 | filePath: 'Chemin du fichier', 78 | yes: 'Oui', 79 | no: 'Non', 80 | confirmation: 'Confirmation', 81 | confirmResetSettings: 'Voulez-vous vraiment réinitialiser tous les paramètres?', 82 | themeStyle: 'Style de thème', 83 | light: 'Clair', 84 | dark: 'Foncé', 85 | orange: 'Orange', 86 | orangeThemeDescription: 'Il faut que ça Néerlandais.', 87 | themeToggleEnabled: 'Basculer le thème', 88 | cyclicRedundancyCheck: 'Contrôle de redondance cyclique', 89 | deepOrange: 'Orange foncé', 90 | deepOrangeDescription: 'Au cas où l\'orange ne suffirait pas.', 91 | amber: 'Ambre', 92 | amberDescription: 'Jaune non sélectif.', 93 | brown: 'Marron', 94 | brownDescription: 'Mieux qu\'une baisse de tension.', 95 | }); 96 | 97 | // eslint-disable-next-line camelcase 98 | export default fr_FR; 99 | -------------------------------------------------------------------------------- /src/languages/it_IT/index.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line camelcase 2 | const it_IT = () => ({ 3 | appName: 'DeadHash', 4 | about: 'Di', 5 | settings: 'Impostazioni', 6 | settingsSubtitle: 'Le tue preferenze', 7 | help: 'Aiuto', 8 | language: 'Linguaggio', 9 | aboutSubtitle: 'Ulteriori informazioni su DeadHash', 10 | aboutMessage: 'DeadHash è stato creato da DeadLine.\n\nAlcune immagini sono state fornite da icons8: https://icons8.com\nLicenza: GPLv3\nVersione: {x}\n\nCopyright © 2022 CodeDead', 11 | codedead: 'CodeDead', 12 | theme: 'Tema', 13 | general: 'Generale', 14 | autoUpdate: 'Controlla automaticamente gli aggiornamenti', 15 | dragAndDrop: 'Abilita il trascinamento della selezione', 16 | select: 'Selezionare', 17 | default: 'Predefinito', 18 | defaultThemeDescription: 'Il tema predefinito', 19 | lightBlue: 'Azzurro', 20 | lightBlueDescription: 'Leggero al tatto.', 21 | red: 'Rosso', 22 | redDescription: 'Tenendolo nervoso.', 23 | green: 'Verde', 24 | greenDescription: 'La natura è la migliore.', 25 | lightGreen: 'Verde chiaro', 26 | lightGreenDescription: 'L\'erba è sempre più verde.', 27 | purple: 'Viola', 28 | purpleDescription: 'Ametista.', 29 | deepPurple: 'Viola profondo', 30 | deepPurpleDescription: 'Nel caso in cui il viola non fosse abbastanza.', 31 | grey: 'Grigio', 32 | greyDescription: 'Non aspettare.', 33 | cryptography: 'Crittografia', 34 | cryptographySubtitle: '#', 35 | md4: 'MD4', 36 | md5: 'MD5', 37 | sha1: 'SHA-1', 38 | sha256: 'SHA-256', 39 | sha384: 'SHA-384', 40 | sha512: 'SHA-512', 41 | ripemd160: 'RIPEMD-160', 42 | sha224: 'SHA-224', 43 | crc1: 'CRC1', 44 | crc8: 'CRC8', 45 | crc16: 'CRC16', 46 | crc24: 'CRC24', 47 | crc32: 'CRC32', 48 | file: 'File', 49 | fileSubtitle: 'Calcola gli hash dei file', 50 | text: 'Testo', 51 | textSubtitle: 'Calcola gli hash del testo', 52 | license: 'Licenza', 53 | download: 'Scaricare', 54 | cancel: 'Annulla', 55 | ok: 'OK', 56 | errorTitle: 'Si è verificato un errore!', 57 | compare: 'Confrontare', 58 | compareHash: 'Il tuo hash qui', 59 | calculate: 'Calcolare', 60 | output: 'Produzione', 61 | copy: 'Copia', 62 | paste: 'Incolla', 63 | clear: 'Chiaro', 64 | reset: 'Reset', 65 | updateAvailable: 'Aggiornamento disponibile!', 66 | information: 'Informazione', 67 | newVersion: 'Versione {x} è ora disponibile. Vuoi scaricare questa versione?', 68 | checkForUpdates: 'Controlla gli aggiornamenti', 69 | noUpdatesTitle: 'Nessun aggiornamento disponibile!', 70 | noUpdatesMessage: 'Stai utilizzando l\'ultima versione di DeadHash.', 71 | minimizeEnabled: 'Pulsante Riduci a icona', 72 | maximizeEnabled: 'Pulsante Massimizza', 73 | languageEnabled: 'Pulsante lingua', 74 | exit: 'Uscire', 75 | export: 'Esportare', 76 | yourTextHere: 'Il tuo testo qui', 77 | filePath: 'Percorso del file', 78 | yes: 'Sì', 79 | no: 'No', 80 | confirmation: 'Conferma', 81 | confirmResetSettings: 'Sei sicuro di voler ripristinare tutte le impostazioni?', 82 | themeStyle: 'Stile del tema', 83 | light: 'Luce', 84 | dark: 'Buio', 85 | orange: 'Arancia', 86 | orangeThemeDescription: 'Prendiamo l\'olandese.', 87 | themeToggleEnabled: 'Commutazione del tema', 88 | cyclicRedundancyCheck: 'Controllo di ridondanza ciclico', 89 | deepOrange: 'Arancio intenso', 90 | deepOrangeDescription: 'Nel caso l\'arancione non fosse abbastanza.', 91 | amber: 'Ambra', 92 | amberDescription: 'Giallo non selettivo.', 93 | brown: 'Marrone', 94 | brownDescription: 'Meglio di un brownout.', 95 | }); 96 | 97 | // eslint-disable-next-line camelcase 98 | export default it_IT; 99 | -------------------------------------------------------------------------------- /src/languages/jp_JP/index.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line camelcase 2 | const jp_JP = () => ({ 3 | appName: 'DeadHash', 4 | about: '約', 5 | settings: '設定', 6 | settingsSubtitle: 'あなたの好み', 7 | help: '助けて', 8 | language: '言語', 9 | aboutSubtitle: 'DeadHashの詳細', 10 | aboutMessage: 'DeadHashはDeadLineによって作成されました。\n\n一部の画像は、icons8によって提供されました:https://icons8.com\nライセンス:GPLv3\nバージョン:{x}\n\n著作権©2022 CodeDead', 11 | codedead: 'CodeDead', 12 | theme: 'テーマ', 13 | general: '全般', 14 | autoUpdate: '更新を自動的に確認する', 15 | dragAndDrop: 'ドラッグアンドドロップを有効にする', 16 | select: '選択してください', 17 | default: 'デフォルト', 18 | defaultThemeDescription: 'デフォルトのテーマ。', 19 | lightBlue: 'ライトブルー', 20 | lightBlueDescription: '軽いタッチ。', 21 | red: '赤', 22 | redDescription: 'エッジの効いた状態を保ちます。', 23 | green: '緑', 24 | greenDescription: '自然の最高級。', 25 | lightGreen: '薄緑', 26 | lightGreenDescription: '草は常に緑です。', 27 | purple: '紫の', 28 | purpleDescription: 'アメジスト。', 29 | deepPurple: 'ディープ・パープル', 30 | deepPurpleDescription: '紫では足りない場合に。', 31 | grey: 'グレー', 32 | greyDescription: '待ってはいけません。', 33 | cryptography: '暗号化', 34 | cryptographySubtitle: '#', 35 | md4: 'MD4', 36 | md5: 'MD5', 37 | sha1: 'SHA-1', 38 | sha256: 'SHA-256', 39 | sha384: 'SHA-384', 40 | sha512: 'SHA-512', 41 | ripemd160: 'RIPEMD-160', 42 | sha224: 'SHA-224', 43 | crc1: 'CRC1', 44 | crc8: 'CRC8', 45 | crc16: 'CRC16', 46 | crc24: 'CRC24', 47 | crc32: 'CRC32', 48 | file: 'ファイル', 49 | fileSubtitle: 'ファイルハッシュの計算', 50 | text: 'テキスト', 51 | textSubtitle: 'テキストハッシュを計算する', 52 | license: 'ライセンス', 53 | download: 'ダウンロード', 54 | cancel: 'キャンセル', 55 | ok: 'オーケー', 56 | errorTitle: 'エラーが発生しました!', 57 | compare: '比較する', 58 | compareHash: 'ここにあなたのハッシュ', 59 | calculate: '計算する', 60 | output: '出力', 61 | copy: 'コピー', 62 | paste: 'ペースト', 63 | clear: 'クリア', 64 | reset: 'リセットする', 65 | updateAvailable: '更新可能!', 66 | information: '情報', 67 | newVersion: 'バージョン{x}が利用可能になりました。 このバージョンをダウンロードしますか?', 68 | checkForUpdates: '更新を確認する', 69 | noUpdatesTitle: '利用可能なアップデートはありません!', 70 | noUpdatesMessage: 'DeadHashの最新バージョンを使用しています。', 71 | minimizeEnabled: '最小化ボタン', 72 | maximizeEnabled: '最大化ボタン', 73 | languageEnabled: '言語ボタン', 74 | exit: '出口', 75 | export: '書き出す', 76 | yourTextHere: 'ここにあなたのテキスト', 77 | filePath: 'ファイルパス', 78 | yes: 'はい', 79 | no: '番号', 80 | confirmation: '確認', 81 | confirmResetSettings: 'すべての設定をリセットしてもよろしいですか?', 82 | themeStyle: 'テーマスタイル', 83 | light: '光', 84 | dark: '闇', 85 | orange: 'オレンジ', 86 | orangeThemeDescription: 'オランダ語を取得しましょう。', 87 | themeToggleEnabled: 'テーマの切り替え', 88 | cyclicRedundancyCheck: '巡回冗長検査', 89 | deepOrange: '濃いオレンジ', 90 | deepOrangeDescription: 'オレンジでは不十分な場合に備えて。', 91 | amber: 'アンバー', 92 | amberDescription: '選択的ではない黄色。', 93 | brown: '褐色', 94 | brownDescription: '電圧低下よりも優れています。', 95 | }); 96 | 97 | // eslint-disable-next-line camelcase 98 | export default jp_JP; 99 | -------------------------------------------------------------------------------- /src/languages/nl_NL/index.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line camelcase 2 | const nl_NL = () => ({ 3 | appName: 'DeadHash', 4 | about: 'Over', 5 | settings: 'Instellingen', 6 | settingsSubtitle: 'Jouw voorkeuren', 7 | help: 'Help', 8 | language: 'Taal', 9 | aboutSubtitle: 'Leer meer over DeadHash', 10 | aboutMessage: 'DeadHash werd gemaakt door DeadLine.\n\nSommige afbeeldingen werden afgeleverd door icons8: https://icons8.com\nLicentie: GPLv3\nVersie: {x}\n\nCopyright © 2022 CodeDead', 11 | codedead: 'CodeDead', 12 | theme: 'Thema', 13 | general: 'Algemeen', 14 | autoUpdate: 'Zoek automatisch naar updates', 15 | dragAndDrop: 'Slepen en neerzetten inschakelen', 16 | select: 'Selecteren', 17 | default: 'Standaard', 18 | defaultThemeDescription: 'Het standaard thema.', 19 | lightBlue: 'Lichtblauw', 20 | lightBlueDescription: 'Licht aanvoelend.', 21 | red: 'Rood', 22 | redDescription: 'Hou het edgy.', 23 | green: 'Groen', 24 | greenDescription: 'Het beste van de natuur.', 25 | lightGreen: 'Lichtgroen', 26 | lightGreenDescription: 'Het gras is altijd groener.', 27 | purple: 'Paars', 28 | purpleDescription: 'Amethist.', 29 | deepPurple: 'Donker paars', 30 | deepPurpleDescription: 'In het geval paars niet genoeg was.', 31 | grey: 'Grijs', 32 | greyDescription: 'Blijf niet wakker.', 33 | cryptography: 'Cryptografie', 34 | cryptographySubtitle: '#', 35 | md4: 'MD4', 36 | md5: 'MD5', 37 | sha1: 'SHA-1', 38 | sha256: 'SHA-256', 39 | sha384: 'SHA-384', 40 | sha512: 'SHA-512', 41 | ripemd160: 'RIPEMD-160', 42 | sha224: 'SHA-224', 43 | crc1: 'CRC1', 44 | crc8: 'CRC8', 45 | crc16: 'CRC16', 46 | crc24: 'CRC24', 47 | crc32: 'CRC32', 48 | file: 'Bestand', 49 | fileSubtitle: 'Bereken bestand hashes', 50 | text: 'Tekst', 51 | textSubtitle: 'Bereken tekst hashes', 52 | license: 'Licentie', 53 | download: 'Download', 54 | cancel: 'Annuleren', 55 | ok: 'OK', 56 | errorTitle: 'Er is een fout opgetreden!', 57 | compare: 'Vergelijken', 58 | compareHash: 'Jouw hash hier', 59 | calculate: 'Bereken', 60 | output: 'Uitvoer', 61 | copy: 'Kopiëren', 62 | paste: 'Plakken', 63 | clear: 'Wissen', 64 | reset: 'Reset', 65 | updateAvailable: 'Update beschikbaar!', 66 | information: 'Informatie', 67 | newVersion: 'Versie {x} is nu beschikbaar. Wil je deze versie nu downloaden?', 68 | checkForUpdates: 'Controleer op updates', 69 | noUpdatesTitle: 'Geen updates beschikbaar!', 70 | noUpdatesMessage: 'Je gebruikt de laatste versie van DeadHash.', 71 | minimizeEnabled: 'Minimaliseer knop', 72 | maximizeEnabled: 'Maximaliseer knop', 73 | languageEnabled: 'Taal knop', 74 | exit: 'Sluiten', 75 | export: 'Exporteren', 76 | yourTextHere: 'Jouw text hier', 77 | filePath: 'Bestandspad', 78 | yes: 'Ja', 79 | no: 'Nee', 80 | confirmation: 'Bevestiging', 81 | confirmResetSettings: 'Bent u zeker dat u alle instellingen wenst te resetten?', 82 | themeStyle: 'Thema stijl', 83 | light: 'Licht', 84 | dark: 'Donker', 85 | orange: 'Oranje', 86 | orangeThemeDescription: 'Op z\'n Nederlands.', 87 | themeToggleEnabled: 'Thema wisselen', 88 | cyclicRedundancyCheck: 'Cyclische redundantiecontrole', 89 | deepOrange: 'Diep oranje', 90 | deepOrangeDescription: 'Voor het geval oranje niet genoeg was.', 91 | amber: 'Amber', 92 | amberDescription: 'Niet selectief geel.', 93 | brown: 'Bruin', 94 | brownDescription: 'Beter dan een brownout.', 95 | }); 96 | 97 | // eslint-disable-next-line camelcase 98 | export default nl_NL; 99 | -------------------------------------------------------------------------------- /src/languages/pt_PT/index.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line camelcase 2 | const pt_PT = () => ({ 3 | appName: 'DeadHash', 4 | about: 'Sobre', 5 | settings: 'Definições', 6 | settingsSubtitle: 'Suas preferencias', 7 | help: 'Socorro', 8 | language: 'Língua', 9 | aboutSubtitle: 'Saiba mais sobre o DeadHash', 10 | aboutMessage: 'DeadHash foi criado por DeadLine.\n\nAlgumas imagens foram fornecidas por icons8: https://icons8.com\nLicença: GPLv3\nVersão: {x}\n\nDireitos autorais © 2022 CodeDead', 11 | codedead: 'CodeDead', 12 | theme: 'Tema', 13 | general: 'Geral', 14 | autoUpdate: 'Verificar atualizações automaticamente', 15 | dragAndDrop: 'Ativar arrastar e soltar', 16 | select: 'Selecione', 17 | default: 'Padrão', 18 | defaultThemeDescription: 'O tema padrão.', 19 | lightBlue: 'Azul claro', 20 | lightBlueDescription: 'Luz ao toque.', 21 | red: 'Vermelho', 22 | redDescription: 'Mantendo-o nervoso.', 23 | green: 'Verde', 24 | greenDescription: 'A natureza é a melhor.', 25 | lightGreen: 'Luz verde', 26 | lightGreenDescription: 'A grama é sempre mais verde.', 27 | purple: 'Roxo', 28 | purpleDescription: 'Ametista.', 29 | deepPurple: 'Roxo profundo', 30 | deepPurpleDescription: 'Caso roxo não seja suficiente.', 31 | grey: 'Cinzento', 32 | greyDescription: 'Não espere.', 33 | cryptography: 'Criptografia', 34 | cryptographySubtitle: '#', 35 | md4: 'MD4', 36 | md5: 'MD5', 37 | sha1: 'SHA-1', 38 | sha256: 'SHA-256', 39 | sha384: 'SHA-384', 40 | sha512: 'SHA-512', 41 | ripemd160: 'RIPEMD-160', 42 | sha224: 'SHA-224', 43 | crc1: 'CRC1', 44 | crc8: 'CRC8', 45 | crc16: 'CRC16', 46 | crc24: 'CRC24', 47 | crc32: 'CRC32', 48 | file: 'Arquivo', 49 | fileSubtitle: 'Calcular hashes de arquivo', 50 | text: 'Texto', 51 | textSubtitle: 'Calcular hashes de texto', 52 | license: 'Licença', 53 | download: 'Baixar', 54 | cancel: 'Cancelar', 55 | ok: 'OK', 56 | errorTitle: 'Um erro ocorreu!', 57 | compare: 'Comparar', 58 | compareHash: 'Seu hash aqui', 59 | calculate: 'Calcular', 60 | output: 'Resultado', 61 | copy: 'Copiar', 62 | paste: 'Colar', 63 | clear: 'Claro', 64 | reset: 'Redefinir', 65 | updateAvailable: 'Atualização disponível!', 66 | information: 'Informação', 67 | newVersion: 'Versão {x} já está disponível. Deseja baixar esta versão?', 68 | checkForUpdates: 'Verifique se há atualizações', 69 | noUpdatesTitle: 'Não há atualizações disponíveis!', 70 | noUpdatesMessage: 'Você está usando a versão mais recente do DeadHash.', 71 | minimizeEnabled: 'Botão Minimizar', 72 | maximizeEnabled: 'Botão Maximizar', 73 | languageEnabled: 'Botão de idioma', 74 | exit: 'Saída', 75 | export: 'Exportação', 76 | yourTextHere: 'Seu texto aqui', 77 | filePath: 'Caminho de arquivo', 78 | yes: 'Sim', 79 | no: 'Não', 80 | confirmation: 'Confirmação', 81 | confirmResetSettings: 'Tem certeza de que deseja redefinir todas as configurações?', 82 | themeStyle: 'Estilo do tema', 83 | light: 'Luz', 84 | dark: 'Sombrio', 85 | orange: 'Laranja', 86 | orangeThemeDescription: 'Vamos para o holandês.', 87 | themeToggleEnabled: 'Alternar tema', 88 | cyclicRedundancyCheck: 'Verificação de redundância Cíclica', 89 | deepOrange: 'Laranja profundo', 90 | deepOrangeDescription: 'No caso de laranja não ser suficiente.', 91 | amber: 'Âmbar', 92 | amberDescription: 'Amarelo não seletivo.', 93 | brown: 'Castanho', 94 | brownDescription: 'Melhor do que um brownout.', 95 | }); 96 | 97 | // eslint-disable-next-line camelcase 98 | export default pt_PT; 99 | -------------------------------------------------------------------------------- /src/languages/ru_RU/index.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line camelcase 2 | const ru_RU = () => ({ 3 | appName: 'DeadHash', 4 | about: 'Около', 5 | settings: 'настройки', 6 | settingsSubtitle: 'Ваши предпочтения', 7 | help: 'Помогите', 8 | language: 'язык', 9 | aboutSubtitle: 'Узнайте больше о DeadHash', 10 | aboutMessage: 'DeadHash был создан DeadLine.\n\nНекоторые изображения предоставлены icons8: https://icons8.com\nЛицензия: GPLv3\nВерсия: {x}\n\nCopyright © 2022 CodeDead', 11 | codedead: 'CodeDead', 12 | theme: 'тема', 13 | general: 'генеральный', 14 | autoUpdate: 'Автоматически проверять наличие обновлений', 15 | dragAndDrop: 'Включить перетаскивание', 16 | select: 'Выбрать', 17 | default: 'По умолчанию', 18 | defaultThemeDescription: 'Тема по умолчанию.', 19 | lightBlue: 'Светло-синий', 20 | lightBlueDescription: 'Свет на ощупь.', 21 | red: 'красный', 22 | redDescription: 'Сохраняя это острым.', 23 | green: 'зеленый', 24 | greenDescription: 'Природа самая лучшая.', 25 | lightGreen: 'Светло-зеленый', 26 | lightGreenDescription: 'Трава всегда зеленее.', 27 | purple: 'Фиолетовый', 28 | purpleDescription: 'Аметист.', 29 | deepPurple: 'Темно-фиолетовый', 30 | deepPurpleDescription: 'На случай, если фиолетового было недостаточно.', 31 | grey: 'Серый', 32 | greyDescription: 'Не жди.', 33 | cryptography: 'криптография', 34 | cryptographySubtitle: '#', 35 | md4: 'MD4', 36 | md5: 'MD5', 37 | sha1: 'SHA-1', 38 | sha256: 'SHA-256', 39 | sha384: 'SHA-384', 40 | sha512: 'SHA-512', 41 | ripemd160: 'RIPEMD-160', 42 | sha224: 'SHA-224', 43 | crc1: 'CRC1', 44 | crc8: 'CRC8', 45 | crc16: 'CRC16', 46 | crc24: 'CRC24', 47 | crc32: 'CRC32', 48 | file: 'файл', 49 | fileSubtitle: 'Рассчитать хэши файлов', 50 | text: 'Текст', 51 | textSubtitle: 'Рассчитать текстовые хэши', 52 | license: 'Лицензия', 53 | download: 'Скачать', 54 | cancel: 'Отмена', 55 | ok: 'хорошо', 56 | errorTitle: 'Произошла ошибка!', 57 | compare: 'сравнить', 58 | compareHash: 'Ваш хеш здесь', 59 | calculate: 'Рассчитать', 60 | output: 'Выход', 61 | copy: 'копия', 62 | paste: 'Вставить', 63 | clear: 'ясно', 64 | reset: 'Сброс', 65 | updateAvailable: 'Доступно обновление!', 66 | information: 'Информация', 67 | newVersion: 'Версия {x} теперь доступна. Хотите скачать эту версию?', 68 | checkForUpdates: 'Проверьте наличие обновлений', 69 | noUpdatesTitle: 'Нет доступных обновлений!', 70 | noUpdatesMessage: 'Вы используете последнюю версию DeadHash.', 71 | minimizeEnabled: 'Кнопка свертывания', 72 | maximizeEnabled: 'Кнопка увеличения', 73 | languageEnabled: 'Языковая кнопка', 74 | exit: 'Выход', 75 | export: 'экспорт', 76 | yourTextHere: 'Здесь ваш текст', 77 | filePath: 'Путь файла', 78 | yes: 'да', 79 | no: 'нет', 80 | confirmation: 'подтверждение', 81 | confirmResetSettings: 'Вы уверены, что хотите сбросить все настройки?', 82 | themeStyle: 'Стиль темы', 83 | light: 'Свет', 84 | dark: 'Тьма', 85 | orange: 'Оранжевый', 86 | orangeThemeDescription: 'Давайте перейдем к голландскому.', 87 | themeToggleEnabled: 'Переключение темы', 88 | cyclicRedundancyCheck: 'Циклическая проверка избыточности', 89 | deepOrange: 'Темно-оранжевый', 90 | deepOrangeDescription: 'На случай, если оранжевого было недостаточно.', 91 | amber: 'Янтарь', 92 | amberDescription: 'Неселективный желтый.', 93 | brown: 'Коричневый', 94 | brownDescription: 'Лучше, чем отключение электричества.', 95 | }); 96 | 97 | // eslint-disable-next-line camelcase 98 | export default ru_RU; 99 | -------------------------------------------------------------------------------- /src/languages/tr_TR/index.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line camelcase 2 | const tr_TR = () => ({ 3 | appName: 'DeadHash', 4 | about: 'Hakkında', 5 | settings: 'Ayarlar', 6 | settingsSubtitle: 'Tercihleriniz', 7 | help: 'Yardım', 8 | language: 'Dil', 9 | aboutSubtitle: 'DeadHash hakkında daha fazla bilgi edinin', 10 | aboutMessage: 'DeadHash, DeadLine tarafından oluşturuldu.\n\nBazı resimler icons8 tarafından sağlandı: https://icons8.com\nLisans: GPLv3\nSürüm: {x}\n\nTelif Hakkı © 2022 CodeDead', 11 | codedead: 'CodeDead', 12 | theme: 'Tema', 13 | general: 'Genel', 14 | autoUpdate: 'Güncellemeleri otomatik olarak kontrol et', 15 | dragAndDrop: 'Sürükle ve bırak özelliğini etkinleştir', 16 | select: 'Seçmek', 17 | default: 'Varsayılan', 18 | defaultThemeDescription: 'Varsayılan tema.', 19 | lightBlue: 'Açık mavi', 20 | lightBlueDescription: 'Dokunuşa ışık tut.', 21 | red: 'Kırmızı', 22 | redDescription: 'Sinirsiz tutmak.', 23 | green: 'Yeşil', 24 | greenDescription: 'Doğa en iyisidir.', 25 | lightGreen: 'Açık yeşil', 26 | lightGreenDescription: 'Çim her zaman yeşildir.', 27 | purple: 'Mor', 28 | purpleDescription: 'Ametist.', 29 | deepPurple: 'Koyu mor', 30 | deepPurpleDescription: 'Mor yetmediyse diye.', 31 | grey: 'Gri', 32 | greyDescription: 'Beklemeyin.', 33 | cryptography: 'Kriptografi', 34 | cryptographySubtitle: '#', 35 | md4: 'MD4', 36 | md5: 'MD5', 37 | sha1: 'SHA-1', 38 | sha256: 'SHA-256', 39 | sha384: 'SHA-384', 40 | sha512: 'SHA-512', 41 | ripemd160: 'RIPEMD-160', 42 | sha224: 'SHA-224', 43 | crc1: 'CRC1', 44 | crc8: 'CRC8', 45 | crc16: 'CRC16', 46 | crc24: 'CRC24', 47 | crc32: 'CRC32', 48 | file: 'Dosya', 49 | fileSubtitle: 'Dosya karmaları hesapla', 50 | text: 'Metin', 51 | textSubtitle: 'Metin karma değerlerini hesapla', 52 | license: 'Lisans', 53 | download: 'İndir', 54 | cancel: 'İptal etmek', 55 | ok: 'Tamam', 56 | errorTitle: 'Bir hata oluştu!', 57 | compare: 'Karşılaştırmak', 58 | compareHash: 'Burda', 59 | calculate: 'Hesaplamak', 60 | output: 'Çıktı', 61 | copy: 'Kopya', 62 | paste: 'Yapıştırmak', 63 | clear: 'Açık', 64 | reset: 'Sıfırlama', 65 | updateAvailable: 'Güncelleme uygun!', 66 | information: 'Bilgi', 67 | newVersion: 'Versiyon {x} kullanılabilir. Bu sürümü indirmek ister misiniz?', 68 | checkForUpdates: 'Güncellemeleri kontrol et', 69 | noUpdatesTitle: 'Güncelleme yok!', 70 | noUpdatesMessage: 'DeadHash’ın en son sürümünü kullanıyorsunuz.', 71 | minimizeEnabled: 'Küçült düğmesi', 72 | maximizeEnabled: 'Büyüt düğmesi', 73 | languageEnabled: 'Dil düğmesi', 74 | exit: 'Kapatmak', 75 | export: 'Ihracat', 76 | yourTextHere: 'Buraya yazın', 77 | filePath: 'Dosya yolu', 78 | yes: 'Evet', 79 | no: 'Hayır', 80 | confirmation: 'Onayla', 81 | confirmResetSettings: 'Tüm ayarları sıfırlamak istediğinizden emin misiniz?', 82 | themeStyle: 'Tema stili', 83 | light: 'Işık', 84 | dark: 'Karanlık', 85 | orange: 'Turuncu', 86 | orangeThemeDescription: 'Dutch alalım.', 87 | themeToggleEnabled: 'Tema geçişi', 88 | cyclicRedundancyCheck: 'Döngüsel artıklık denetimi', 89 | deepOrange: 'Koyu turuncu', 90 | deepOrangeDescription: 'Portakal yeterli değilse diye.', 91 | amber: 'Kehribar', 92 | amberDescription: 'Seçici sarı değil.', 93 | brown: 'Kahverengi', 94 | brownDescription: 'Kesintiden daha iyi.', 95 | }); 96 | 97 | // eslint-disable-next-line camelcase 98 | export default tr_TR; 99 | -------------------------------------------------------------------------------- /src/reducers/CryptoReducer/Actions/actionTypes.js: -------------------------------------------------------------------------------- 1 | export const SET_MD4_STATE = 'SET_MD4_STATE'; 2 | export const SET_MD5_STATE = 'SET_MD5_STATE'; 3 | export const SET_SHA1_STATE = 'SET_SHA1_STATE'; 4 | export const SET_SHA256_STATE = 'SET_SHA256_STATE'; 5 | export const SET_SHA384_STATE = 'SET_SHA384_STATE'; 6 | export const SET_SHA512_STATE = 'SET_SHA512_STATE'; 7 | export const SET_RIPEMD160_STATE = 'SET_RIPEMD160_STATE'; 8 | export const SET_SHA224_STATE = 'SET_SHA224_STATE'; 9 | export const SET_CRC1_STATE = 'SET_CRC1_STATE'; 10 | export const SET_CRC8_STATE = 'SET_CRC8_STATE'; 11 | export const SET_CRC16_STATE = 'SET_CRC16_STATE'; 12 | export const SET_CRC24_STATE = 'SET_CRC24_STATE'; 13 | export const SET_CRC32_STATE = 'SET_CRC32_STATE'; 14 | export const RESET_CRYPTO_REDUCER = 'RESET_CRYPTO_REDUCER'; 15 | export const SET_FILE_HASHES = 'SET_FILE_HASHES'; 16 | export const SET_TEXT_HASHES = 'SET_TEXT_HASHES'; 17 | export const SET_TEXT_INPUT = 'SET_TEXT_INPUT'; 18 | export const SET_CURRENT_FILE = 'SET_CURRENT_FILE'; 19 | export const SET_FILE_COMPARING = 'SET_FILE_COMPARING'; 20 | export const SET_FILE_COMPARE_HASH = 'SET_FILE_COMPARE_HASH'; 21 | export const SET_FILE_HASH_LOADING = 'SET_FILE_HASH_LOADING'; 22 | export const SET_TEXT_COMPARING = 'SET_TEXT_COMPARING'; 23 | export const SET_TEXT_COMPARE_HASH = 'SET_TEXT_COMPARE_HASH'; 24 | export const SET_TEXT_HASH_LOADING = 'SET_TEXT_HASH_LOADING'; 25 | export const SET_TEXT_HASH_ERROR = 'SET_TEXT_HASH_ERROR'; 26 | export const SET_FILE_HASH_ERROR = 'SET_FILE_HASH_ERROR'; 27 | -------------------------------------------------------------------------------- /src/reducers/CryptoReducer/Actions/index.js: -------------------------------------------------------------------------------- 1 | import { 2 | RESET_CRYPTO_REDUCER, 3 | SET_CRC1_STATE, 4 | SET_CRC8_STATE, 5 | SET_CRC16_STATE, 6 | SET_CRC24_STATE, 7 | SET_CRC32_STATE, 8 | SET_CURRENT_FILE, 9 | SET_FILE_COMPARE_HASH, 10 | SET_FILE_COMPARING, 11 | SET_FILE_HASH_ERROR, 12 | SET_FILE_HASH_LOADING, 13 | SET_FILE_HASHES, 14 | SET_MD4_STATE, 15 | SET_MD5_STATE, 16 | SET_RIPEMD160_STATE, 17 | SET_SHA1_STATE, 18 | SET_SHA224_STATE, 19 | SET_SHA256_STATE, 20 | SET_SHA384_STATE, 21 | SET_SHA512_STATE, 22 | SET_TEXT_COMPARE_HASH, 23 | SET_TEXT_COMPARING, 24 | SET_TEXT_HASH_ERROR, 25 | SET_TEXT_HASH_LOADING, 26 | SET_TEXT_HASHES, 27 | SET_TEXT_INPUT, 28 | } from './actionTypes'; 29 | 30 | export const setMd4State = (state) => ({ 31 | type: SET_MD4_STATE, 32 | payload: state, 33 | }); 34 | 35 | export const setMd5State = (state) => ({ 36 | type: SET_MD5_STATE, 37 | payload: state, 38 | }); 39 | 40 | export const setSha1State = (state) => ({ 41 | type: SET_SHA1_STATE, 42 | payload: state, 43 | }); 44 | 45 | export const setSha256State = (state) => ({ 46 | type: SET_SHA256_STATE, 47 | payload: state, 48 | }); 49 | 50 | export const setSha384State = (state) => ({ 51 | type: SET_SHA384_STATE, 52 | payload: state, 53 | }); 54 | 55 | export const setSha512State = (state) => ({ 56 | type: SET_SHA512_STATE, 57 | payload: state, 58 | }); 59 | 60 | export const setRipeMd160State = (state) => ({ 61 | type: SET_RIPEMD160_STATE, 62 | payload: state, 63 | }); 64 | 65 | export const setSha224State = (state) => ({ 66 | type: SET_SHA224_STATE, 67 | payload: state, 68 | }); 69 | 70 | export const setCrc1State = (state) => ({ 71 | type: SET_CRC1_STATE, 72 | payload: state, 73 | }); 74 | 75 | export const setCrc8State = (state) => ({ 76 | type: SET_CRC8_STATE, 77 | payload: state, 78 | }); 79 | 80 | export const setCrc16State = (state) => ({ 81 | type: SET_CRC16_STATE, 82 | payload: state, 83 | }); 84 | 85 | export const setCrc24State = (state) => ({ 86 | type: SET_CRC24_STATE, 87 | payload: state, 88 | }); 89 | 90 | export const setCrc32State = (state) => ({ 91 | type: SET_CRC32_STATE, 92 | payload: state, 93 | }); 94 | 95 | export const resetCryptoReducer = () => ({ 96 | type: RESET_CRYPTO_REDUCER, 97 | }); 98 | 99 | export const setFileHashes = (hashes) => ({ 100 | type: SET_FILE_HASHES, 101 | payload: hashes, 102 | }); 103 | 104 | export const setTextHashes = (hashes) => ({ 105 | type: SET_TEXT_HASHES, 106 | payload: hashes, 107 | }); 108 | 109 | export const setTextInput = (input) => ({ 110 | type: SET_TEXT_INPUT, 111 | payload: input, 112 | }); 113 | 114 | export const setCurrentFile = (currentFile) => ({ 115 | type: SET_CURRENT_FILE, 116 | payload: currentFile, 117 | }); 118 | 119 | export const setFileHashComparing = (comparing) => ({ 120 | type: SET_FILE_COMPARING, 121 | payload: comparing, 122 | }); 123 | 124 | export const setFileCompareHash = (hash) => ({ 125 | type: SET_FILE_COMPARE_HASH, 126 | payload: hash, 127 | }); 128 | 129 | export const setFileHashLoading = (loading) => ({ 130 | type: SET_FILE_HASH_LOADING, 131 | payload: loading, 132 | }); 133 | 134 | export const setTextHashComparing = (comparing) => ({ 135 | type: SET_TEXT_COMPARING, 136 | payload: comparing, 137 | }); 138 | 139 | export const setTextCompareHash = (hash) => ({ 140 | type: SET_TEXT_COMPARE_HASH, 141 | payload: hash, 142 | }); 143 | 144 | export const setTextHashLoading = (loading) => ({ 145 | type: SET_TEXT_HASH_LOADING, 146 | payload: loading, 147 | }); 148 | 149 | export const setTextHashError = (error) => ({ 150 | type: SET_TEXT_HASH_ERROR, 151 | payload: error, 152 | }); 153 | 154 | export const setFileHashError = (error) => ({ 155 | type: SET_FILE_HASH_ERROR, 156 | payload: error, 157 | }); 158 | -------------------------------------------------------------------------------- /src/reducers/CryptoReducer/index.js: -------------------------------------------------------------------------------- 1 | import { 2 | RESET_CRYPTO_REDUCER, 3 | SET_CRC1_STATE, 4 | SET_CRC8_STATE, 5 | SET_CRC16_STATE, 6 | SET_CRC24_STATE, 7 | SET_CRC32_STATE, 8 | SET_CURRENT_FILE, 9 | SET_FILE_COMPARE_HASH, 10 | SET_FILE_COMPARING, 11 | SET_FILE_HASH_ERROR, 12 | SET_FILE_HASH_LOADING, 13 | SET_FILE_HASHES, 14 | SET_MD4_STATE, 15 | SET_MD5_STATE, 16 | SET_RIPEMD160_STATE, 17 | SET_SHA1_STATE, 18 | SET_SHA224_STATE, 19 | SET_SHA256_STATE, 20 | SET_SHA384_STATE, 21 | SET_SHA512_STATE, 22 | SET_TEXT_COMPARE_HASH, 23 | SET_TEXT_COMPARING, 24 | SET_TEXT_HASH_ERROR, 25 | SET_TEXT_HASH_LOADING, 26 | SET_TEXT_HASHES, 27 | SET_TEXT_INPUT, 28 | } from './Actions/actionTypes'; 29 | 30 | const CryptoReducer = (state, action) => { 31 | const { type, payload } = action; 32 | switch (type) { 33 | case SET_MD4_STATE: 34 | localStorage.md4 = payload; 35 | return { 36 | ...state, 37 | md4: payload, 38 | }; 39 | case SET_MD5_STATE: 40 | localStorage.md5 = payload; 41 | return { 42 | ...state, 43 | md5: payload, 44 | }; 45 | case SET_SHA1_STATE: 46 | localStorage.sha1 = payload; 47 | return { 48 | ...state, 49 | sha1: payload, 50 | }; 51 | case SET_SHA256_STATE: 52 | localStorage.sha256 = payload; 53 | return { 54 | ...state, 55 | sha256: payload, 56 | }; 57 | case SET_SHA384_STATE: 58 | localStorage.sha384 = payload; 59 | return { 60 | ...state, 61 | sha384: payload, 62 | }; 63 | case SET_SHA512_STATE: 64 | localStorage.sha512 = payload; 65 | return { 66 | ...state, 67 | sha512: payload, 68 | }; 69 | case SET_RIPEMD160_STATE: 70 | localStorage.ripemd160 = payload; 71 | return { 72 | ...state, 73 | ripemd160: payload, 74 | }; 75 | case SET_SHA224_STATE: 76 | localStorage.sha224 = payload; 77 | return { 78 | ...state, 79 | sha224: payload, 80 | }; 81 | case SET_CRC1_STATE: 82 | localStorage.crc1 = payload; 83 | return { 84 | ...state, 85 | crc1: payload, 86 | }; 87 | case SET_CRC8_STATE: 88 | localStorage.crc8 = payload; 89 | return { 90 | ...state, 91 | crc8: payload, 92 | }; 93 | case SET_CRC16_STATE: 94 | localStorage.crc16 = payload; 95 | return { 96 | ...state, 97 | crc16: payload, 98 | }; 99 | case SET_CRC24_STATE: 100 | localStorage.crc24 = payload; 101 | return { 102 | ...state, 103 | crc24: payload, 104 | }; 105 | case SET_CRC32_STATE: 106 | localStorage.crc32 = payload; 107 | return { 108 | ...state, 109 | crc32: payload, 110 | }; 111 | case RESET_CRYPTO_REDUCER: 112 | localStorage.md4 = true; 113 | localStorage.md5 = true; 114 | localStorage.sha1 = true; 115 | localStorage.sha256 = true; 116 | localStorage.sha384 = true; 117 | localStorage.sha512 = true; 118 | localStorage.ripemd160 = true; 119 | localStorage.sha224 = true; 120 | localStorage.crc1 = false; 121 | localStorage.crc8 = false; 122 | localStorage.crc16 = false; 123 | localStorage.crc24 = false; 124 | localStorage.crc32 = true; 125 | 126 | return { 127 | ...state, 128 | md4: true, 129 | md5: true, 130 | sha1: true, 131 | sha224: true, 132 | sha256: true, 133 | sha384: true, 134 | sha512: true, 135 | ripemd160: true, 136 | crc1: false, 137 | crc8: false, 138 | crc16: false, 139 | crc24: false, 140 | crc32: true, 141 | }; 142 | case SET_TEXT_HASHES: 143 | return { 144 | ...state, 145 | textHashes: payload, 146 | }; 147 | case SET_FILE_HASHES: 148 | return { 149 | ...state, 150 | fileHashes: payload, 151 | }; 152 | case SET_TEXT_INPUT: 153 | return { 154 | ...state, 155 | textInput: payload, 156 | }; 157 | case SET_CURRENT_FILE: 158 | return { 159 | ...state, 160 | currentFile: payload, 161 | fileHashes: null, 162 | }; 163 | case SET_FILE_COMPARING: 164 | return { 165 | ...state, 166 | fileComparing: payload, 167 | }; 168 | case SET_FILE_COMPARE_HASH: 169 | return { 170 | ...state, 171 | fileCompareHash: payload, 172 | }; 173 | case SET_FILE_HASH_LOADING: 174 | return { 175 | ...state, 176 | fileHashLoading: payload, 177 | }; 178 | case SET_TEXT_COMPARING: 179 | return { 180 | ...state, 181 | textComparing: payload, 182 | }; 183 | case SET_TEXT_COMPARE_HASH: 184 | return { 185 | ...state, 186 | textCompareHash: payload, 187 | }; 188 | case SET_TEXT_HASH_LOADING: 189 | return { 190 | ...state, 191 | textHashLoading: payload, 192 | }; 193 | case SET_TEXT_HASH_ERROR: 194 | return { 195 | ...state, 196 | textErrorMessage: payload, 197 | }; 198 | case SET_FILE_HASH_ERROR: 199 | return { 200 | ...state, 201 | fileErrorMessage: payload, 202 | }; 203 | default: 204 | return state; 205 | } 206 | }; 207 | 208 | export default CryptoReducer; 209 | -------------------------------------------------------------------------------- /src/reducers/MainReducer/Actions/actionTypes.js: -------------------------------------------------------------------------------- 1 | export const SET_LANGUAGE_INDEX = 'SET_LANGUAGE_INDEX'; 2 | export const SET_ACTIVE_LIST_ITEM = 'SET_ACTIVE_LIST_ITEM'; 3 | export const SET_THEME_INDEX = 'SET_THEME_INDEX'; 4 | export const SET_THEME_STYLE = 'SET_THEME_STYLE'; 5 | export const SET_AUTO_UPDATE = 'SET_AUTO_UPDATE'; 6 | export const SET_UPDATE_CHECKED = 'SET_UPDATE_CHECKED'; 7 | export const RESET_MAIN_REDUCER = 'RESET_MAIN_REDUCER'; 8 | export const SET_MINIMIZE_STATUS = 'SET_MINIMIZE_STATUS'; 9 | export const SET_MAXIMIZE_STATUS = 'SET_MAXIMIZE_STATUS'; 10 | export const SET_LANGUAGE_STATUS = 'SET_LANGUAGE_STATUS'; 11 | export const SET_THEME_TOGGLE_STATUS = 'SET_THEME_TOGGLE_STATUS'; 12 | export const SET_CAN_DRAG_DROP = 'SET_CAN_DRAG_DROP'; 13 | -------------------------------------------------------------------------------- /src/reducers/MainReducer/Actions/index.js: -------------------------------------------------------------------------------- 1 | import { 2 | RESET_MAIN_REDUCER, 3 | SET_ACTIVE_LIST_ITEM, 4 | SET_AUTO_UPDATE, 5 | SET_CAN_DRAG_DROP, 6 | SET_LANGUAGE_INDEX, 7 | SET_LANGUAGE_STATUS, 8 | SET_MAXIMIZE_STATUS, 9 | SET_MINIMIZE_STATUS, 10 | SET_THEME_INDEX, 11 | SET_THEME_STYLE, 12 | SET_THEME_TOGGLE_STATUS, 13 | SET_UPDATE_CHECKED, 14 | } from './actionTypes'; 15 | 16 | export const setLanguageIndex = (index) => ({ 17 | type: SET_LANGUAGE_INDEX, 18 | payload: index, 19 | }); 20 | 21 | export const setActiveListItem = (item) => ({ 22 | type: SET_ACTIVE_LIST_ITEM, 23 | payload: item, 24 | }); 25 | 26 | export const setThemeIndex = (index) => ({ 27 | type: SET_THEME_INDEX, 28 | payload: index, 29 | }); 30 | 31 | export const setThemeStyle = (style) => ({ 32 | type: SET_THEME_STYLE, 33 | payload: style, 34 | }); 35 | 36 | export const setAutoUpdate = (autoUpdate) => ({ 37 | type: SET_AUTO_UPDATE, 38 | payload: autoUpdate, 39 | }); 40 | 41 | export const setUpdateChecked = (checked) => ({ 42 | type: SET_UPDATE_CHECKED, 43 | payload: checked, 44 | }); 45 | 46 | export const resetMainReducer = () => ({ 47 | type: RESET_MAIN_REDUCER, 48 | }); 49 | 50 | export const setMinimizeStatus = (status) => ({ 51 | type: SET_MINIMIZE_STATUS, 52 | payload: status, 53 | }); 54 | 55 | export const setMaximizeStatus = (status) => ({ 56 | type: SET_MAXIMIZE_STATUS, 57 | payload: status, 58 | }); 59 | 60 | export const setLanguageButtonStatus = (status) => ({ 61 | type: SET_LANGUAGE_STATUS, 62 | payload: status, 63 | }); 64 | 65 | export const setThemeToggleStatus = (status) => ({ 66 | type: SET_THEME_TOGGLE_STATUS, 67 | payload: status, 68 | }); 69 | 70 | export const setCanDragDrop = (status) => ({ 71 | type: SET_CAN_DRAG_DROP, 72 | payload: status, 73 | }); 74 | -------------------------------------------------------------------------------- /src/reducers/MainReducer/index.js: -------------------------------------------------------------------------------- 1 | import { 2 | RESET_MAIN_REDUCER, 3 | SET_ACTIVE_LIST_ITEM, 4 | SET_AUTO_UPDATE, 5 | SET_CAN_DRAG_DROP, 6 | SET_LANGUAGE_INDEX, 7 | SET_LANGUAGE_STATUS, 8 | SET_MAXIMIZE_STATUS, 9 | SET_MINIMIZE_STATUS, 10 | SET_THEME_INDEX, 11 | SET_THEME_STYLE, 12 | SET_THEME_TOGGLE_STATUS, 13 | SET_UPDATE_CHECKED, 14 | } from './Actions/actionTypes'; 15 | 16 | const MainReducer = (state, action) => { 17 | switch (action.type) { 18 | case SET_LANGUAGE_INDEX: 19 | localStorage.languageIndex = action.payload; 20 | return { 21 | ...state, 22 | languageIndex: action.payload, 23 | }; 24 | case SET_ACTIVE_LIST_ITEM: 25 | return { 26 | ...state, 27 | selectedListItem: action.payload, 28 | }; 29 | case SET_THEME_INDEX: 30 | localStorage.themeIndex = action.payload; 31 | return { 32 | ...state, 33 | themeIndex: action.payload, 34 | }; 35 | case SET_THEME_STYLE: 36 | localStorage.themeStyle = action.payload; 37 | return { 38 | ...state, 39 | themeStyle: action.payload, 40 | }; 41 | case SET_AUTO_UPDATE: 42 | localStorage.autoUpdate = action.payload; 43 | return { 44 | ...state, 45 | autoUpdate: action.payload, 46 | }; 47 | case SET_UPDATE_CHECKED: 48 | return { 49 | ...state, 50 | checkedForUpdates: action.payload, 51 | }; 52 | case RESET_MAIN_REDUCER: 53 | localStorage.languageIndex = 1; 54 | localStorage.themeStyle = 'light'; 55 | localStorage.themeIndex = 0; 56 | localStorage.autoUpdate = true; 57 | localStorage.minimizeEnabled = true; 58 | localStorage.maximizeEnabled = true; 59 | localStorage.languageEnabled = false; 60 | localStorage.canDragDrop = true; 61 | localStorage.themeToggleEnabled = false; 62 | 63 | return { 64 | ...state, 65 | languageIndex: 1, 66 | themeStyle: 'light', 67 | themeIndex: 0, 68 | autoUpdate: true, 69 | minimizeEnabled: true, 70 | maximizeEnabled: true, 71 | languageEnabled: false, 72 | canDragDrop: true, 73 | themeToggleEnabled: false, 74 | }; 75 | case SET_MINIMIZE_STATUS: 76 | localStorage.minimizeEnabled = action.payload; 77 | return { 78 | ...state, 79 | minimizeEnabled: action.payload, 80 | }; 81 | case SET_MAXIMIZE_STATUS: 82 | localStorage.maximizeEnabled = action.payload; 83 | return { 84 | ...state, 85 | maximizeEnabled: action.payload, 86 | }; 87 | case SET_LANGUAGE_STATUS: 88 | localStorage.languageEnabled = action.payload; 89 | return { 90 | ...state, 91 | languageEnabled: action.payload, 92 | }; 93 | case SET_THEME_TOGGLE_STATUS: 94 | localStorage.themeToggleEnabled = action.payload; 95 | return { 96 | ...state, 97 | themeToggleEnabled: action.payload, 98 | }; 99 | case SET_CAN_DRAG_DROP: 100 | localStorage.canDragDrop = action.payload; 101 | return { 102 | ...state, 103 | canDragDrop: action.payload, 104 | }; 105 | default: 106 | return state; 107 | } 108 | }; 109 | 110 | export default MainReducer; 111 | -------------------------------------------------------------------------------- /src/routes/About/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { useContext, useEffect, useState } from 'react'; 2 | import Container from '@mui/material/Container'; 3 | import Grid from '@mui/material/Grid'; 4 | import Button from '@mui/material/Button'; 5 | import RefreshIcon from '@mui/icons-material/Refresh'; 6 | import Card from '@mui/material/Card'; 7 | import CardContent from '@mui/material/CardContent'; 8 | import Typography from '@mui/material/Typography'; 9 | import Updater from '../../utils/Updater'; 10 | import UpdateDialog from '../../components/UpdateDialog'; 11 | import AlertDialog from '../../components/AlertDialog'; 12 | import { setActiveListItem } from '../../reducers/MainReducer/Actions'; 13 | import { MainContext } from '../../contexts/MainContextProvider'; 14 | import PageHeader from '../../components/PageHeader'; 15 | 16 | const os = window.require('os'); 17 | const { ipcRenderer } = window.require('electron'); 18 | 19 | let appVersion; 20 | 21 | ipcRenderer.on('get-version-reply', (_e, version) => { 22 | appVersion = version; 23 | }); 24 | 25 | ipcRenderer.send('get-version'); 26 | 27 | const About = () => { 28 | const [state, dispatch] = useContext(MainContext); 29 | const language = state.languages[state.languageIndex]; 30 | 31 | const [errorMessage, setErrorMessage] = useState(null); 32 | const [loading, setLoading] = useState(false); 33 | const [update, setUpdate] = useState(null); 34 | 35 | useEffect(() => { 36 | dispatch(setActiveListItem(5)); 37 | }, []); 38 | 39 | /** 40 | * Check for updates 41 | */ 42 | const checkForUpdates = () => { 43 | if (loading) return; 44 | 45 | setLoading(true); 46 | setUpdate(null); 47 | setErrorMessage(null); 48 | 49 | Updater(os) 50 | .then((res) => { 51 | setUpdate(res); 52 | }) 53 | .catch((error) => { 54 | setErrorMessage(error); 55 | }) 56 | .finally(() => { 57 | setLoading(false); 58 | }); 59 | }; 60 | 61 | return ( 62 |
63 | 64 |
70 | {update && update.updateAvailable ? ( 71 | 81 | ) : null} 82 | {update && !update.updateAvailable ? ( 83 | 88 | ) : null} 89 | {errorMessage && errorMessage.length > 0 ? ( 90 | 95 | ) : null} 96 | 100 | 101 | 102 | 103 | 104 | 105 | {language.aboutMessage.replace('{x}', appVersion)} 106 | 107 | 108 | 109 | 117 | 118 | 119 | 127 | 128 | 129 | 130 | 131 | 139 | 140 |
141 |
142 | ); 143 | }; 144 | 145 | export default About; 146 | -------------------------------------------------------------------------------- /src/routes/File/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useRef, useContext } from 'react'; 2 | import Checkbox from '@mui/material/Checkbox'; 3 | import FormControlLabel from '@mui/material/FormControlLabel'; 4 | import Container from '@mui/material/Container'; 5 | import Button from '@mui/material/Button'; 6 | import TextField from '@mui/material/TextField'; 7 | import Card from '@mui/material/Card'; 8 | import CardContent from '@mui/material/CardContent'; 9 | import Grid from '@mui/material/Grid'; 10 | import CopyPasteMenu from '../../components/CopyPasteMenu'; 11 | import CsvExport from '../../components/CsvExport'; 12 | import { setActiveListItem } from '../../reducers/MainReducer/Actions'; 13 | import { MainContext } from '../../contexts/MainContextProvider'; 14 | import { CryptoContext } from '../../contexts/CryptoContextReducer'; 15 | import { 16 | setCurrentFile, 17 | setFileCompareHash, 18 | setFileHashComparing, 19 | setFileHashError, 20 | setFileHashes, 21 | setFileHashLoading, 22 | } from '../../reducers/CryptoReducer/Actions'; 23 | import LoadingBar from '../../components/LoadingBar'; 24 | import AlertDialog from '../../components/AlertDialog'; 25 | import PageHeader from '../../components/PageHeader'; 26 | import HashList from '../../components/HashList'; 27 | 28 | const { ipcRenderer } = window.require('electron'); 29 | 30 | const File = () => { 31 | const [state, d1] = useContext(MainContext); 32 | const [crypto, d2] = useContext(CryptoContext); 33 | 34 | const hashes = crypto.fileHashes; 35 | const file = crypto.currentFile; 36 | 37 | const { 38 | md4, md5, sha1, sha224, sha256, sha384, sha512, ripemd160, 39 | crc1, crc8, crc16, crc24, crc32, 40 | } = crypto; 41 | 42 | const compare = crypto.fileComparing; 43 | const compareHash = crypto.fileCompareHash; 44 | const loading = crypto.fileHashLoading; 45 | const errorMessage = crypto.fileErrorMessage; 46 | 47 | const language = state.languages[state.languageIndex]; 48 | 49 | const fileRef = useRef(null); 50 | 51 | useEffect(() => { 52 | d1(setActiveListItem(1)); 53 | }, []); 54 | 55 | const output = hashes && hashes.length > 0 56 | ? ( 57 | 64 | ) 65 | : null; 66 | 67 | const compareField = compare ? ( 68 | 69 | navigator.clipboard.writeText(compareHash)} 72 | copy={language.copy} 73 | paste={language.paste} 74 | pasteData={() => { 75 | navigator.clipboard.readText() 76 | .then((text) => { 77 | d2(setFileCompareHash(text)); 78 | }); 79 | }} 80 | > 81 | d2(setFileCompareHash(e.target.value))} 85 | label={language.compareHash} 86 | /> 87 | 88 | 89 | ) : null; 90 | 91 | /** 92 | * Calculate the hashes of a specific file 93 | */ 94 | const calculateHashes = (e) => { 95 | if (e) e.preventDefault(); 96 | if (!file || file.length === 0) return; 97 | 98 | d2(setFileHashError(null)); 99 | d2(setFileHashes(null)); 100 | d2(setFileHashLoading(true)); 101 | 102 | ipcRenderer.send('calculate-file-hash', { 103 | filePath: file.path, 104 | md4, 105 | md5, 106 | sha1, 107 | sha224, 108 | sha256, 109 | sha384, 110 | sha512, 111 | ripemd160, 112 | crc1, 113 | crc8, 114 | crc16, 115 | crc24, 116 | crc32, 117 | }); 118 | }; 119 | 120 | /** 121 | * Clear the user interface 122 | */ 123 | const clearData = () => { 124 | d2(setFileHashError(null)); 125 | d2(setFileCompareHash('')); 126 | d2(setFileHashComparing(false)); 127 | d2(setCurrentFile(null)); 128 | }; 129 | 130 | /** 131 | * Change the currently selected file 132 | * @param event The event that called this function 133 | */ 134 | const onFileChange = (event) => { 135 | d2(setCurrentFile(event.target.files[0])); 136 | fileRef.current.value = ''; 137 | }; 138 | 139 | /** 140 | * Method that is called when the error dialog is called 141 | */ 142 | const onErrorClose = () => { 143 | d2(setFileHashError(null)); 144 | }; 145 | 146 | return ( 147 |
148 | 149 |
155 | {errorMessage && errorMessage.length > 0 ? ( 156 | 162 | ) : null} 163 | 164 | 165 | 166 | 167 | 168 | { 171 | if (!loading) fileRef.current.click(); 172 | }} 173 | disabled 174 | id="filled-disabled" 175 | value={file && file.path ? file.path : ''} 176 | label={language.filePath} 177 | /> 178 | 179 | 185 | 186 | 187 | 196 | 197 | 198 | 199 | d2(setFileHashComparing(e.target.checked))} 204 | value="compare" 205 | /> 206 | )} 207 | label={language.compare} 208 | /> 209 | 210 | {compareField} 211 | 212 | 213 | 214 | {hashes && hashes.length > 0 ? ( 215 | <> 216 | 223 | 224 | 225 | 231 | 232 | 233 | ) : null} 234 | {loading ? : ( 235 | 246 | )} 247 | {output} 248 | 249 |
250 |
251 | ); 252 | }; 253 | 254 | export default File; 255 | -------------------------------------------------------------------------------- /src/routes/Settings/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { useContext, useEffect, useState } from 'react'; 2 | import Container from '@mui/material/Container'; 3 | import Typography from '@mui/material/Typography'; 4 | import FormLabel from '@mui/material/FormLabel'; 5 | import Radio from '@mui/material/Radio'; 6 | import RadioGroup from '@mui/material/RadioGroup'; 7 | import Grid from '@mui/material/Grid'; 8 | import blue from '@mui/material/colors/blue'; 9 | import purple from '@mui/material/colors/purple'; 10 | import deepPurple from '@mui/material/colors/deepPurple'; 11 | import lightBlue from '@mui/material/colors/lightBlue'; 12 | import red from '@mui/material/colors/red'; 13 | import green from '@mui/material/colors/green'; 14 | import lightGreen from '@mui/material/colors/lightGreen'; 15 | import grey from '@mui/material/colors/grey'; 16 | import orange from '@mui/material/colors/orange'; 17 | import deepOrange from '@mui/material/colors/deepOrange'; 18 | import amber from '@mui/material/colors/amber'; 19 | import brown from '@mui/material/colors/brown'; 20 | import FormGroup from '@mui/material/FormGroup'; 21 | import FormControlLabel from '@mui/material/FormControlLabel'; 22 | import Checkbox from '@mui/material/Checkbox'; 23 | import FormControl from '@mui/material/FormControl'; 24 | import InputLabel from '@mui/material/InputLabel'; 25 | import Select from '@mui/material/Select'; 26 | import MenuItem from '@mui/material/MenuItem'; 27 | import Button from '@mui/material/Button'; 28 | import Card from '@mui/material/Card'; 29 | import CardContent from '@mui/material/CardContent'; 30 | import Updater from '../../utils/Updater'; 31 | import UpdateDialog from '../../components/UpdateDialog'; 32 | import AlertDialog from '../../components/AlertDialog'; 33 | import ConfirmationDialog from '../../components/ConfirmationDialog'; 34 | import Theme from '../../components/Theme'; 35 | import GridList from '../../components/GridList'; 36 | import { 37 | resetMainReducer, 38 | setActiveListItem, 39 | setAutoUpdate, 40 | setCanDragDrop, 41 | setLanguageButtonStatus, 42 | setLanguageIndex, 43 | setMaximizeStatus, 44 | setMinimizeStatus, 45 | setThemeIndex, 46 | setThemeStyle, 47 | setThemeToggleStatus, 48 | } from '../../reducers/MainReducer/Actions'; 49 | import { MainContext } from '../../contexts/MainContextProvider'; 50 | import { CryptoContext } from '../../contexts/CryptoContextReducer'; 51 | import { 52 | resetCryptoReducer, 53 | setMd4State, 54 | setMd5State, 55 | setRipeMd160State, 56 | setSha1State, 57 | setSha224State, 58 | setSha256State, 59 | setSha384State, 60 | setSha512State, 61 | setCrc1State, 62 | setCrc8State, 63 | setCrc16State, 64 | setCrc24State, 65 | setCrc32State, 66 | } from '../../reducers/CryptoReducer/Actions'; 67 | import PageHeader from '../../components/PageHeader'; 68 | 69 | const os = window.require('os'); 70 | 71 | const Settings = () => { 72 | const [state, d1] = useContext(MainContext); 73 | const [crypto, d2] = useContext(CryptoContext); 74 | 75 | const { 76 | themeIndex, 77 | themeStyle, 78 | languageIndex, 79 | canDragDrop, 80 | minimizeEnabled, 81 | maximizeEnabled, 82 | languageEnabled, 83 | autoUpdate, 84 | themeToggleEnabled, 85 | } = state; 86 | 87 | const language = state.languages[languageIndex]; 88 | 89 | const { 90 | md4, md5, sha1, sha224, sha256, sha384, sha512, ripemd160, 91 | crc1, crc8, crc16, crc24, crc32, 92 | } = crypto; 93 | 94 | const [errorMessage, setErrorMessage] = useState(null); 95 | const [loading, setLoading] = useState(false); 96 | const [update, setUpdate] = useState(null); 97 | const [confirmOpen, setConfirmOpen] = useState(false); 98 | 99 | useEffect(() => { 100 | d1(setActiveListItem(3)); 101 | }, []); 102 | 103 | /** 104 | * Change the theme 105 | * @param index The index of the theme 106 | */ 107 | const changeTheme = (index) => { 108 | d1(setThemeIndex(index)); 109 | }; 110 | 111 | /** 112 | * Dispatch an event to change the language 113 | * @param e The event that contains the language index 114 | */ 115 | const handleLanguageChange = (e) => { 116 | d1(setLanguageIndex(e.target.value)); 117 | }; 118 | 119 | /** 120 | * Reset all settings to their default values 121 | */ 122 | const resetSettings = () => { 123 | d1(resetMainReducer()); 124 | d2(resetCryptoReducer()); 125 | }; 126 | 127 | /** 128 | * Check for application updates 129 | */ 130 | const checkForUpdates = () => { 131 | if (loading) return; 132 | 133 | setLoading(true); 134 | setUpdate(null); 135 | setErrorMessage(null); 136 | 137 | Updater(os) 138 | .then((res) => { 139 | setUpdate(res); 140 | }) 141 | .catch((error) => { 142 | setErrorMessage(error); 143 | }) 144 | .finally(() => { 145 | setLoading(false); 146 | }); 147 | }; 148 | 149 | /** 150 | * Change the theme style 151 | * @param event The event argument 152 | */ 153 | const changeThemeStyle = (event) => { 154 | d1(setThemeStyle(event.target.value)); 155 | }; 156 | 157 | return ( 158 |
159 | 160 |
166 | {update && update.updateAvailable ? ( 167 | 177 | ) : null} 178 | {update && !update.updateAvailable ? ( 179 | 184 | ) : null} 185 | {errorMessage && errorMessage.length > 0 ? ( 186 | 191 | ) : null} 192 | 196 | 197 | 198 | 199 | {language.general} 200 | 201 | 202 | 203 | 204 | d1(setAutoUpdate(e.target.checked))} 209 | value="autoUpdate" 210 | /> 211 | )} 212 | label={language.autoUpdate} 213 | /> 214 | d1(setCanDragDrop(e.target.checked))} 219 | value="canDragDrop" 220 | /> 221 | )} 222 | label={language.dragAndDrop} 223 | /> 224 | d1(setMinimizeStatus(e.target.checked))} 229 | value="minimizeEnabled" 230 | /> 231 | )} 232 | label={language.minimizeEnabled} 233 | /> 234 | d1(setMaximizeStatus(e.target.checked))} 239 | value="maximizeEnabled" 240 | /> 241 | )} 242 | label={language.maximizeEnabled} 243 | /> 244 | d1(setLanguageButtonStatus(e.target.checked))} 249 | value="languageEnabled" 250 | /> 251 | )} 252 | label={language.languageEnabled} 253 | /> 254 | d1(setThemeToggleStatus(e.target.checked))} 259 | value="themeToggleEnabled" 260 | /> 261 | )} 262 | label={language.themeToggleEnabled} 263 | /> 264 | 265 | {language.language} 266 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | {language.cryptography} 292 | 293 | 294 | 295 | d2(setMd4State(e.target.checked))} 300 | value="md4" 301 | /> 302 | )} 303 | label={language.md4} 304 | /> 305 | 306 | d2(setMd5State(e.target.checked))} 311 | value="md5" 312 | /> 313 | )} 314 | label={language.md5} 315 | /> 316 | 317 | d2(setSha1State(e.target.checked))} 322 | value="sha1" 323 | /> 324 | )} 325 | label={language.sha1} 326 | /> 327 | 328 | d2(setSha224State(e.target.checked))} 333 | value="sha224" 334 | /> 335 | )} 336 | label={language.sha224} 337 | /> 338 | 339 | d2(setSha256State(e.target.checked))} 344 | value="sha256" 345 | /> 346 | )} 347 | label={language.sha256} 348 | /> 349 | 350 | d2(setSha384State(e.target.checked))} 355 | value="sha384" 356 | /> 357 | )} 358 | label={language.sha384} 359 | /> 360 | 361 | d2(setSha512State(e.target.checked))} 366 | value="sha512" 367 | /> 368 | )} 369 | label={language.sha512} 370 | /> 371 | 372 | d2(setRipeMd160State(e.target.checked))} 377 | value="ripemd160" 378 | /> 379 | )} 380 | label={language.ripemd160} 381 | /> 382 | 383 | 384 | 385 | 386 | 387 | {language.cyclicRedundancyCheck} 388 | 389 | 390 | 391 | d2(setCrc1State(e.target.checked))} 396 | value="crc1" 397 | /> 398 | )} 399 | label={language.crc1} 400 | /> 401 | d2(setCrc8State(e.target.checked))} 406 | value="crc8" 407 | /> 408 | )} 409 | label={language.crc8} 410 | /> 411 | d2(setCrc16State(e.target.checked))} 416 | value="crc16" 417 | /> 418 | )} 419 | label={language.crc16} 420 | /> 421 | d2(setCrc24State(e.target.checked))} 426 | value="crc24" 427 | /> 428 | )} 429 | label={language.crc24} 430 | /> 431 | d2(setCrc32State(e.target.checked))} 436 | value="crc32" 437 | /> 438 | )} 439 | label={language.crc32} 440 | /> 441 | 442 | 443 | 444 | 445 | 446 | {language.theme} 447 | 448 | 449 | 450 | changeTheme(0)} 456 | /> 457 | changeTheme(1)} 463 | /> 464 | changeTheme(2)} 470 | /> 471 | changeTheme(3)} 477 | /> 478 | changeTheme(4)} 484 | /> 485 | changeTheme(5)} 491 | /> 492 | changeTheme(6)} 498 | /> 499 | changeTheme(7)} 505 | /> 506 | changeTheme(8)} 512 | /> 513 | changeTheme(9)} 519 | /> 520 | changeTheme(10)} 526 | /> 527 | changeTheme(11)} 533 | /> 534 | 535 | 536 | 537 | 538 | {language.themeStyle} 539 | 540 | } label={language.light} /> 541 | } label={language.dark} /> 542 | 543 | 544 | 545 | 546 | 554 | 561 | 562 | setConfirmOpen(false)} 565 | yes={language.yes} 566 | no={language.no} 567 | title={language.confirmation} 568 | content={language.confirmResetSettings} 569 | onAccept={() => resetSettings()} 570 | /> 571 |
572 |
573 | ); 574 | }; 575 | 576 | export default Settings; 577 | -------------------------------------------------------------------------------- /src/routes/Text/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { useContext, useEffect } from 'react'; 2 | import Checkbox from '@mui/material/Checkbox'; 3 | import FormControlLabel from '@mui/material/FormControlLabel'; 4 | import Button from '@mui/material/Button'; 5 | import Container from '@mui/material/Container'; 6 | import TextField from '@mui/material/TextField'; 7 | import Card from '@mui/material/Card'; 8 | import CardContent from '@mui/material/CardContent'; 9 | import Grid from '@mui/material/Grid'; 10 | import CopyPasteMenu from '../../components/CopyPasteMenu'; 11 | import CsvExport from '../../components/CsvExport'; 12 | import { setActiveListItem } from '../../reducers/MainReducer/Actions'; 13 | import { MainContext } from '../../contexts/MainContextProvider'; 14 | import { CryptoContext } from '../../contexts/CryptoContextReducer'; 15 | import { 16 | setTextCompareHash, 17 | setTextHashComparing, 18 | setTextHashError, 19 | setTextHashes, 20 | setTextHashLoading, 21 | setTextInput, 22 | } from '../../reducers/CryptoReducer/Actions'; 23 | import LoadingBar from '../../components/LoadingBar'; 24 | import AlertDialog from '../../components/AlertDialog'; 25 | import PageHeader from '../../components/PageHeader'; 26 | import HashList from '../../components/HashList'; 27 | import CompareField from '../../components/CompareField'; 28 | 29 | const { ipcRenderer } = window.require('electron'); 30 | 31 | const Text = () => { 32 | const [state, d1] = useContext(MainContext); 33 | const [crypto, d2] = useContext(CryptoContext); 34 | 35 | const language = state.languages[state.languageIndex]; 36 | 37 | const { 38 | md4, md5, sha1, sha224, sha256, sha384, sha512, ripemd160, 39 | crc1, crc8, crc16, crc24, crc32, 40 | } = crypto; 41 | 42 | const input = crypto.textInput; 43 | const hashes = crypto.textHashes; 44 | 45 | const compare = crypto.textComparing; 46 | const compareHash = crypto.textCompareHash; 47 | const loading = crypto.textHashLoading; 48 | const errorMessage = crypto.textErrorMessage; 49 | 50 | useEffect(() => { 51 | d1(setActiveListItem(2)); 52 | }, []); 53 | 54 | const compareField = compare ? ( 55 | 56 | d2(setTextCompareHash(e))} 61 | value={compareHash} 62 | onPaste={() => navigator.clipboard.readText().then((text) => { 63 | d2(setTextCompareHash(text)); 64 | })} 65 | /> 66 | 67 | ) : null; 68 | 69 | const output = hashes && hashes.length > 0 70 | ? ( 71 | 78 | ) 79 | : null; 80 | 81 | /** 82 | * Calculate the hashes for the specified input data 83 | */ 84 | const calculateHashes = () => { 85 | if (!input || input.length === 0) return; 86 | 87 | d2(setTextHashes(null)); 88 | d2(setTextHashLoading(true)); 89 | d2(setTextHashError(null)); 90 | 91 | ipcRenderer.send('calculate-text-hash', { 92 | text: input, 93 | md4, 94 | md5, 95 | sha1, 96 | sha224, 97 | sha256, 98 | sha384, 99 | sha512, 100 | ripemd160, 101 | crc1, 102 | crc8, 103 | crc16, 104 | crc24, 105 | crc32, 106 | }); 107 | }; 108 | 109 | /** 110 | * Clear the user interface 111 | */ 112 | const clearData = () => { 113 | d2(setTextHashError(null)); 114 | d2(setTextInput('')); 115 | d2(setTextCompareHash('')); 116 | d2(setTextHashComparing(false)); 117 | d2(setTextHashes('')); 118 | }; 119 | 120 | /** 121 | * Method that is called when the error dialog is called 122 | */ 123 | const onErrorClose = () => { 124 | d2(setTextHashError(null)); 125 | }; 126 | 127 | return ( 128 |
129 | 130 |
136 | {errorMessage && errorMessage.length > 0 ? ( 137 | 143 | ) : null} 144 | 145 | 146 | 147 | 148 | 149 | navigator.clipboard.writeText(input)} 152 | copy={language.copy} 153 | paste={language.paste} 154 | pasteData={() => navigator.clipboard.readText() 155 | .then((text) => { 156 | d2(setTextInput(text)); 157 | })} 158 | > 159 | d2(setTextInput(e.target.value))} 165 | multiline 166 | maxRows={6} 167 | /> 168 | 169 | 170 | 171 | d2(setTextHashComparing(e.target.checked))} 176 | value="compare" 177 | /> 178 | )} 179 | label={language.compare} 180 | /> 181 | 182 | 183 | {compareField} 184 | 185 | 186 | {hashes && hashes.length > 0 ? ( 187 | <> 188 | 195 | 196 | 197 | 203 | 204 | 205 | ) : null} 206 | {loading ? () : ( 207 | 218 | )} 219 | {output} 220 | 221 |
222 |
223 | ); 224 | }; 225 | 226 | export default Text; 227 | -------------------------------------------------------------------------------- /src/utils/ThemeSelector/index.js: -------------------------------------------------------------------------------- 1 | import blue from '@mui/material/colors/blue'; 2 | import lightBlue from '@mui/material/colors/lightBlue'; 3 | import red from '@mui/material/colors/red'; 4 | import green from '@mui/material/colors/green'; 5 | import lightGreen from '@mui/material/colors/lightGreen'; 6 | import purple from '@mui/material/colors/purple'; 7 | import deepPurple from '@mui/material/colors/deepPurple'; 8 | import grey from '@mui/material/colors/grey'; 9 | import orange from '@mui/material/colors/orange'; 10 | import deepOrange from '@mui/material/colors/deepOrange'; 11 | import amber from '@mui/material/colors/amber'; 12 | import brown from '@mui/material/colors/brown'; 13 | 14 | /** 15 | * Select the theme, depending on the theme index 16 | * @param index The theme index 17 | * @returns The required color scheme 18 | * @constructor 19 | */ 20 | const ThemeSelector = (index) => { 21 | switch (index) { 22 | case 1: 23 | return lightBlue; 24 | case 2: 25 | return red; 26 | case 3: 27 | return green; 28 | case 4: 29 | return lightGreen; 30 | case 5: 31 | return purple; 32 | case 6: 33 | return deepPurple; 34 | case 7: 35 | return grey; 36 | case 8: 37 | return orange; 38 | case 9: 39 | return deepOrange; 40 | case 10: 41 | return amber; 42 | case 11: 43 | return brown; 44 | default: 45 | return blue; 46 | } 47 | }; 48 | 49 | export default ThemeSelector; 50 | -------------------------------------------------------------------------------- /src/utils/Updater/index.js: -------------------------------------------------------------------------------- 1 | const Updater = (os) => { 2 | /** 3 | * Check whether version b is newer than version a 4 | * @param a Version a 5 | * @param b Version b 6 | * @returns {boolean} True if version b is newer than version a, otherwise false 7 | */ 8 | const isNewer = (a, b) => { 9 | const partsA = a.split('.'); 10 | const partsB = b.split('.'); 11 | const numParts = partsA.length > partsB.length ? partsA.length : partsB.length; 12 | 13 | for (let i = 0; i < numParts; i += 1) { 14 | if ((parseInt(partsB[i], 10) || 0) !== (parseInt(partsA[i], 10) || 0)) { 15 | return ((parseInt(partsB[i], 10) || 0) > (parseInt(partsA[i], 10) || 0)); 16 | } 17 | } 18 | 19 | return false; 20 | }; 21 | 22 | /** 23 | * Parse the information inside an external update 24 | * @param update The update data 25 | * @returns {{infoUrl: null, updateUrl: boolean, downloadUrl: null, version: null}} 26 | */ 27 | const parseUpdate = (update) => { 28 | const platform = update.platforms[os.platform]; 29 | const data = { 30 | updateUrl: false, 31 | downloadUrl: null, 32 | infoUrl: null, 33 | version: null, 34 | }; 35 | 36 | if (isNewer('2.2.3', `${platform.version.majorVersion}.${platform.version.minorVersion}.${platform.version.buildVersion}.${platform.version.revisionVersion}`)) { 37 | data.updateAvailable = true; 38 | } 39 | 40 | data.updateUrl = platform.updateUrl; 41 | data.infoUrl = platform.infoUrl; 42 | data.version = `${platform.version.majorVersion}.${platform.version.minorVersion}.${platform.version.buildVersion}.${platform.version.revisionVersion}`; 43 | 44 | return data; 45 | }; 46 | 47 | return new Promise((resolve, reject) => { 48 | fetch('https://codedead.com/Software/DeadHash/version.json') 49 | .then((res) => { 50 | if (!res.ok) { 51 | throw Error(res.statusText); 52 | } 53 | return res.json(); 54 | }) 55 | .then((data) => resolve(parseUpdate(data))) 56 | .catch((error) => reject(error.toString())); 57 | }); 58 | }; 59 | 60 | export default Updater; 61 | --------------------------------------------------------------------------------