fix checkSHA256 npe

This commit is contained in:
HaliksaR 2020-11-15 06:32:26 +07:00
parent 3b092c9652
commit ad173c9587
1 changed files with 2 additions and 2 deletions

View File

@ -100,9 +100,9 @@ object InternetTools {
return getJsonString(hashUrl, obj, context)
}
fun checkSHA256(sha256: String, updateFile: File?): Boolean {
fun checkSHA256(sha256: String, updateFile: File): Boolean {
return try {
val dataBuffer = updateFile!!.readBytes()
val dataBuffer = updateFile.readBytes()
// Generate the checksum
val sum = generateChecksum(dataBuffer)