mirror of
https://github.com/InvertGeek/MixFile.git
synced 2026-06-04 02:21:31 +08:00
increase key length
This commit is contained in:
@@ -32,7 +32,7 @@ var UPLOAD_TASK_COUNT by cachedMutableOf(10, "upload_task_count")
|
||||
|
||||
fun getUploadRoute(): RoutingHandler {
|
||||
return route@{
|
||||
val key = generateRandomByteArray(16)
|
||||
val key = generateRandomByteArray(32)
|
||||
val name = call.request.queryParameters["name"]
|
||||
val add = call.request.queryParameters["add"] ?: "true"
|
||||
if (name.isNullOrEmpty()) {
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.donut.mixfile.server.utils
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.Canvas
|
||||
import android.graphics.Color
|
||||
import androidx.core.graphics.createBitmap
|
||||
import com.donut.mixfile.util.genRandomString
|
||||
import com.donut.mixfile.util.generateRandomByteArray
|
||||
import com.donut.mixfile.util.ignoreError
|
||||
@@ -33,7 +34,7 @@ fun createBlankBitmap(
|
||||
width: Int = Random.nextInt(50, 100),
|
||||
height: Int = Random.nextInt(50, 100),
|
||||
): Bitmap {
|
||||
val bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888)
|
||||
val bitmap = createBitmap(width, height)
|
||||
val canvas = Canvas(bitmap)
|
||||
canvas.drawColor(Color.rgb(Random.nextInt(255), Random.nextInt(255), Random.nextInt(255)))
|
||||
return bitmap
|
||||
|
||||
@@ -131,12 +131,14 @@ val About = MixNavPage(
|
||||
color = Color.Gray,
|
||||
text = """
|
||||
MixFile采用混合式文件加密上传系统
|
||||
您上传的所有文件都会使用AES-GCM-128算法加密,
|
||||
上传时会生成随机的128位密钥在本地进行加密后进行上传,
|
||||
您上传的所有文件都会使用AES-GCM算法加密,
|
||||
上传时会生成随机的256位密钥在本地进行加密后进行上传,
|
||||
只要不泄漏分享码,文件内容是无法被任何人得知的
|
||||
256位密钥可确保即使是在未来使用量子计算机也无法破解
|
||||
分享码中包含了,文件地址,文件大小,加密使用的密钥等信息
|
||||
分享码默认使用不可见字符隐写到普通文本中进行编码信息
|
||||
如果长度超过发送限制可关闭使用短分享码功能
|
||||
如果分享码丢失,上传的文件将永远无法找回
|
||||
请把应用省电改为无限制,否则文件服务器可能无法在后台运行
|
||||
开启自启动权限后,关闭主页面时将会自动在后台运行服务器
|
||||
""".trimIndent()
|
||||
|
||||
Reference in New Issue
Block a user