Refactor Blake3 hashing implementation in CDokumente; update localization and metadata files

This commit is contained in:
2026-03-11 22:45:42 +01:00
parent 80dc3b40d3
commit 51d9f7fa22
7 changed files with 27 additions and 129 deletions

View File

@@ -41,7 +41,7 @@ class CDokumente extends \Espo\Core\Hooks\Base
return;
}
$newBlake3 = bin2hex(blake3($fileContent));
$newBlake3 = \blake3($fileContent);
// Setze Hash
$entity->set('blake3hash', $newBlake3);

View File

@@ -2,9 +2,7 @@
"fields": {
"dokument": "Download",
"preview": "Vorschau",
"ydocumentuuid": "Y-Document-UUID",
"blake3hash": "Blake3-Hash",
"fileStatus": "Datei-Status",
"contactsvmhdokumente": "Freigegebene Nutzer",
"vmhMietverhltnisesDokumente": "Mietverhältnisse",
"vmhErstgespraechsdokumente": "Erstgespräche",
@@ -40,14 +38,6 @@
"Create CDokumente": "Dokument erstellen"
},
"tooltips": {
"blake3hash": "Kryptografischer Blake3-Hash der Datei (schneller und sicherer als MD5/SHA256)",
"fileStatus": "Status der Datei: new = neu hochgeladen, changed = geändert, synced = synchronisiert"
},
"options": {
"fileStatus": {
"new": "Neu",
"changed": "Geändert",
"synced": "Synchronisiert"
}
"blake3hash": "Kryptografischer Blake3-Hash der Datei (schneller und sicherer als MD5/SHA256)"
}
}

View File

@@ -1,7 +1,6 @@
{
"fields": {
"dokument": "Download",
"ydocumentuuid": "Y-Document-UUID",
"preview": "Preview",
"contactsvmhdokumente": "Portal Users",
"vmhMietverhltnisesDokumente": "Tenancies",
@@ -13,8 +12,6 @@
"mietobjekt2dokumente": "Properties",
"mietinkassosdokumente": "Rent Collection",
"kndigungensdokumente": "Terminations",
"fileStatus": "File Status",
"advowareAktens": "Advoware Akten",
"advowareAktens": "Advoware Akten",
"aIKnowledges": "AI Knowledge",
"advowareAktenHnr": "Advoware HNR",
@@ -46,14 +43,6 @@
"listForAIKnowledge": "List for AI Knowledge"
},
"tooltips": {
"blake3hash": "Cryptographic Blake3 hash of the file (faster and more secure than MD5/SHA256)",
"fileStatus": "File status: new = newly uploaded, changed = modified, synced = synchronized"
},
"options": {
"fileStatus": {
"new": "New",
"changed": "Changed",
"synced": "Synchronized"
}
"blake3hash": "Cryptographic Blake3 hash of the file (faster and more secure than MD5/SHA256)"
}
}

View File

@@ -40,9 +40,8 @@
"rows": [
[
{
"name": "ydocumentuuid"
},
{}
"name": "blake3hash"
}
]
],
"dynamicLogicVisible": null,
@@ -52,73 +51,6 @@
"hidden": false,
"noteText": null,
"noteStyle": "info",
"customLabel": "Externe Identifikatoren"
},
{
"rows": [
[
{
"name": "fileStatus"
},
{
"name": "blake3hash"
},
{}
]
],
"dynamicLogicVisible": null,
"style": "default",
"tabBreak": false,
"tabLabel": null,
"hidden": false,
"noteText": null,
"noteStyle": "info",
"customLabel": "Technische Daten"
},
{
"rows": [
[
{
"name": "aktennr"
},
{
"name": "syncStatus"
},
{
"name": "advowareLastSync"
}
]
],
"dynamicLogicVisible": null,
"style": "default",
"tabBreak": false,
"tabLabel": null,
"hidden": false,
"noteText": null,
"noteStyle": "info",
"customLabel": "Advoware Sync"
},
{
"rows": [
[
{
"name": "xaiId"
},
{
"name": "xaiCollections"
},
{
"name": "xaiSyncStatus"
}
]
],
"dynamicLogicVisible": null,
"style": "default",
"tabBreak": false,
"tabLabel": null,
"hidden": false,
"noteText": null,
"noteStyle": "info",
"customLabel": "x.AI Sync"
}
]

View File

@@ -45,13 +45,6 @@
"isCustom": true,
"audited": true
},
"ydocumentuuid": {
"type": "varchar",
"maxLength": 100,
"readOnlyAfterCreate": true,
"options": [],
"isCustom": true
},
"preview": {
"type": "image",
"previewSize": "medium",
@@ -63,7 +56,7 @@
"type": "varchar",
"maxLength": 64,
"copyToClipboard": true,
"readOnlyAfterCreate": true,
"readOnlyAfterCreate": false,
"options": [],
"isCustom": true,
"tooltip": true
@@ -73,59 +66,53 @@
"entity": "CPuls",
"isCustom": true
},
"fileStatus": {
"type": "enum",
"required": false,
"options": [
"new",
"changed",
"synced"
],
"style": {
"new": "info",
"changed": "warning",
"synced": "success"
},
"default": "new",
"readOnly": false,
"tooltip": true,
"isCustom": true
},
"advowareAktenHnr": {
"type": "int",
"notStorable": true,
"utility": true,
"layoutAvailabilityList": ["listForAdvowareAkten"]
"layoutAvailabilityList": [
"listForAdvowareAkten"
]
},
"advowareAktenSyncstatus": {
"type": "varchar",
"notStorable": true,
"utility": true,
"layoutAvailabilityList": ["listForAdvowareAkten"]
"layoutAvailabilityList": [
"listForAdvowareAkten"
]
},
"advowareAktenLastSync": {
"type": "datetime",
"notStorable": true,
"utility": true,
"layoutAvailabilityList": ["listForAdvowareAkten"]
"layoutAvailabilityList": [
"listForAdvowareAkten"
]
},
"aiKnowledgeAiDocumentId": {
"type": "varchar",
"notStorable": true,
"utility": true,
"layoutAvailabilityList": ["listForAIKnowledge"]
"layoutAvailabilityList": [
"listForAIKnowledge"
]
},
"aiKnowledgeSyncstatus": {
"type": "varchar",
"notStorable": true,
"utility": true,
"layoutAvailabilityList": ["listForAIKnowledge"]
"layoutAvailabilityList": [
"listForAIKnowledge"
]
},
"aiKnowledgeLastSync": {
"type": "datetime",
"notStorable": true,
"utility": true,
"layoutAvailabilityList": ["listForAIKnowledge"]
"layoutAvailabilityList": [
"listForAIKnowledge"
]
}
},
"links": {