File tree 7 files changed +35
-10
lines changed
app/src/main/kotlin/me/leon/view
7 files changed +35
-10
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,10 @@ class AsymmetricCryptoView : Fragment(FX.messages["asymmetric"]) {
40
40
" ${selectedAlg.get()} bits: ${selectedBits.get()} mode: ${
41
41
if (privateKeyEncrypt.get()) " private key encrypt"
42
42
else " public key encrypt"
43
- } cost: $timeConsumption ms"
43
+ } " +
44
+ " ${messages[" inputLength" ]} : ${inputText.length} " +
45
+ " ${messages[" outputLength" ]} : ${outputText.length} " +
46
+ " cost: $timeConsumption ms"
44
47
private val selectedPadding = SimpleStringProperty (RSA_PADDINGS .first())
45
48
private lateinit var labelInfo: Label
46
49
private var keyText: String
Original file line number Diff line number Diff line change @@ -57,8 +57,11 @@ class DigestView : Fragment(messages["hash"]) {
57
57
lateinit var cbBits: ComboBox <String >
58
58
private val info
59
59
get() =
60
- " Hash: $method bits: ${selectedBits.get()} count: $times cost: $timeConsumption ms" +
61
- " file mode: ${isFileMode.get()} "
60
+ " Hash: $method bits: ${selectedBits.get()} " +
61
+ " ${messages[" inputLength" ]} : ${inputText.length} " +
62
+ " ${messages[" outputLength" ]} : ${outputText.length} " +
63
+ " count: $times cost: $timeConsumption ms " +
64
+ " file mode: ${isFileMode.get()} "
62
65
63
66
private var timeConsumption = 0L
64
67
private var startTime = 0L
@@ -118,8 +121,10 @@ class DigestView : Fragment(messages["hash"]) {
118
121
newValue
119
122
} else {
120
123
isEnableFileMode.value = true
121
- " ${selectedAlgItem.get()}${newValue
122
- .takeIf { ALGOS_HASH [selectedAlgItem.get()]!! .size > 1 } ? : " " } "
124
+ " ${selectedAlgItem.get()}${
125
+ newValue
126
+ .takeIf { ALGOS_HASH [selectedAlgItem.get()]!! .size > 1 } ? : " "
127
+ } "
123
128
.replace(" SHA2" , " SHA-" )
124
129
.replace(
125
130
" (Haraka|GOST3411-2012|Keccak|SHA3|Blake2b|Blake2s|DSTU7564|Skein)" .toRegex(),
Original file line number Diff line number Diff line change @@ -50,7 +50,11 @@ class MacView : Fragment("MAC") {
50
50
private val selectedBits = SimpleStringProperty (algorithm.values.first().first())
51
51
private lateinit var cbBits: ComboBox <String >
52
52
private val info
53
- get() = " MAC: $method cost: $timeConsumption ms"
53
+ get() =
54
+ " MAC: $method " +
55
+ " ${messages[" inputLength" ]} : ${inputText.length} " +
56
+ " ${messages[" outputLength" ]} : ${outputText.length} " +
57
+ " cost: $timeConsumption ms"
54
58
private var inputEncode = " raw"
55
59
private var outputEncode = " hex"
56
60
private lateinit var tgInput: ToggleGroup
Original file line number Diff line number Diff line change @@ -39,7 +39,11 @@ class PBEView : Fragment("PBE") {
39
39
private var timeConsumption = 0L
40
40
private var startTime = 0L
41
41
private val info
42
- get() = " PBE Cipher: $cipher charset: ${selectedCharset.get()} cost: $timeConsumption ms"
42
+ get() =
43
+ " PBE Cipher: $cipher charset: ${selectedCharset.get()} " +
44
+ " ${messages[" inputLength" ]} : ${inputText.length} " +
45
+ " ${messages[" outputLength" ]} : ${outputText.length} " +
46
+ " cost: $timeConsumption ms"
43
47
private lateinit var infoLabel: Label
44
48
45
49
private var saltEncode = " hex"
Original file line number Diff line number Diff line change @@ -146,7 +146,10 @@ class SignatureView : Fragment(messages["signVerify"]) {
146
146
private var startTime = 0L
147
147
private val info
148
148
get() =
149
- " Signature: ${selectedKeyPairAlg.get()} hash: ${selectedSigAlg.get()} cost: $timeConsumption ms"
149
+ " Signature: ${selectedKeyPairAlg.get()} hash: ${selectedSigAlg.get()} " +
150
+ " ${messages[" inputLength" ]} : ${msg.length} " +
151
+ " ${messages[" outputLength" ]} : ${signText.length} " +
152
+ " cost: $timeConsumption ms"
150
153
private var inputEncode = " raw"
151
154
private lateinit var tgInput: ToggleGroup
152
155
private val centerNode = vbox {
Original file line number Diff line number Diff line change @@ -33,7 +33,10 @@ class SymmetricCryptoStreamView : Fragment(messages["symmetricStream"]) {
33
33
private var startTime = 0L
34
34
private val info
35
35
get() =
36
- " Cipher: $cipher charset: ${selectedCharset.get()} file mode: ${isFile.get()} cost: $timeConsumption ms"
36
+ " Cipher: $cipher charset: ${selectedCharset.get()} file mode: ${isFile.get()} " +
37
+ " ${messages[" inputLength" ]} : ${inputText.length} " +
38
+ " ${messages[" outputLength" ]} : ${outputText.length} " +
39
+ " cost: $timeConsumption ms"
37
40
private lateinit var infoLabel: Label
38
41
private val keyIvInputView = KeyIvInputView (isEnableIv)
39
42
private var inputEncode = " raw"
Original file line number Diff line number Diff line change @@ -37,7 +37,10 @@ class SymmetricCryptoView : Fragment(messages["symmetricBlock"]) {
37
37
private var startTime = 0L
38
38
private val info
39
39
get() =
40
- " Cipher: $cipher charset: ${selectedCharset.get()} file mode: ${isFile.get()} cost: $timeConsumption ms"
40
+ " Cipher: $cipher charset: ${selectedCharset.get()} file mode: ${isFile.get()} " +
41
+ " ${messages[" inputLength" ]} : ${inputText.length} " +
42
+ " ${messages[" outputLength" ]} : ${outputText.length} " +
43
+ " cost: $timeConsumption ms"
41
44
private lateinit var labelInfo: Label
42
45
private val keyIvInputView = KeyIvInputView (isEnableIv, isEnableAEAD)
43
46
private var inputEncode = " raw"
You can’t perform that action at this time.
0 commit comments