有沒有可能存在MD5校驗值和SHA256校驗值都匹配卻不同的兩個檔案。如果有,那么兩者都同時發生碰撞的概率是多大?最近我想弄一個聯合引索,以便快速檢索網盤系統里面是否存在哈希值匹配的檔案。
下面是我正在設計中的表
create table tb_file
(
file_id bigint not null PRIMARY KEY AUTO_INCREMENT,
file_name text(255) not null,
file_size bigint not null,
file_type bigint not null,
file_status int not null,
file_upload_time text not null,
file_hash_md5 text(128),
file_hash_sha256 text(256),
index index_file_name(file_name(250)),
index index_file_status(file_status),
index index_file_hash_md5(file_hash_md5(128)),
index index_file_hash_sha256(file_hash_sha256(250)),
unique index_file_hash_md5_sha256(file_hash_md5(128), file_hash_sha256(122))
)AUTO_INCREMENT=10000 ENGINE=InnoDB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=Dynamic;
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/273865.html
標籤:MySQL
