-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Language enum and support to multiple (PT, ES, FR) dictionaries
- Loading branch information
Showing
11 changed files
with
10,361 additions
and
36 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
crypto-key-common/src/main/java/com/syntifi/crypto/key/mnemonic/Language.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.syntifi.crypto.key.mnemonic; | ||
|
||
import java.nio.charset.Charset; | ||
import java.nio.charset.StandardCharsets; | ||
import java.util.Locale; | ||
|
||
public enum Language { | ||
EN("english.txt", "ad90bf3beb7b0eb7e5acd74727dc0da96e0a280a258354e7293fb7e211ac03db", StandardCharsets.UTF_8, Locale.ENGLISH), | ||
PT("portuguese.txt", "eed387d44cf8f32f60754527e265230d8019e8a2277937c71ef812e7a46c93fd", StandardCharsets.UTF_8, Locale.forLanguageTag("PT")), | ||
ES("spanish.txt", "a556a26c6a5bb36db0fb7d8bf579cb7465fcaeec03957c0dda61b569962d9da5", StandardCharsets.UTF_8, Locale.forLanguageTag("ES")), | ||
FR("french.txt", "9cbdaadbd3ce9cbaee1b360fce45e935b21e3e2c56d9fcd56b3398ced2371866", StandardCharsets.UTF_8, Locale.FRENCH), | ||
CNS("chinese_simplified.txt", "bfd683b91db88609fabad8968c7efe4bf69606bf5a49ac4a4ba5e355955670cb", StandardCharsets.UTF_8, Locale.CHINA), | ||
CNT("chinese_traditional.txt", "", StandardCharsets.UTF_8, Locale.CHINESE); | ||
|
||
private final String fileName; | ||
private final String checkSum; | ||
private final Charset charset; | ||
private final Locale locale; | ||
|
||
Language(String fileName, String checkSum, Charset charset, Locale locale) { | ||
this.fileName = fileName; | ||
this.checkSum = checkSum; | ||
this.charset = charset; | ||
this.locale = locale; | ||
} | ||
|
||
|
||
public String getFileName() { | ||
return fileName; | ||
} | ||
|
||
public String getCheckSum() { | ||
return checkSum; | ||
} | ||
|
||
public Charset getCharset() { | ||
return charset; | ||
} | ||
|
||
public Locale getLocale() { | ||
return locale; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.