Skip to content

Commit

Permalink
fix(app): 哈希算法,base64,hex编码迭代计算错误 #220
Browse files Browse the repository at this point in the history
  • Loading branch information
Leon406 committed Feb 5, 2024
1 parent d321233 commit d0e3670
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/src/main/kotlin/me/leon/view/DigestView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,14 @@ class DigestView : Fragment(messages["hash"]) {
inputText.lineAction2String { controller.digestFile(method, it) }
} else {
var result: String = inputText
repeat(times) {
result = controller.digest(method, result, inputEncode, singleLine.get())
repeat(times) { time ->
result =
controller.digest(
method,
result,
"raw".takeIf { time > 0 } ?: inputEncode,
singleLine.get()
)
}
result
}
Expand Down

0 comments on commit d0e3670

Please sign in to comment.