Merge branch 'dev' into staging

This commit is contained in:
Hugo Lextrait 2023-05-10 18:59:38 +02:00
commit 17846abcac
4 changed files with 12 additions and 11 deletions

13
package-lock.json generated
View File

@ -17,7 +17,7 @@
"cors": "^2.8.5",
"express": "^4.18.2",
"jsonwebtoken": "^9.0.0",
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.40",
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.44",
"module-alias": "^2.2.2",
"multer": "^1.4.5-lts.1",
"next": "^13.1.5",
@ -2371,9 +2371,9 @@
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
},
"node_modules/electron-to-chromium": {
"version": "1.4.388",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.388.tgz",
"integrity": "sha512-xZ0y4zjWZgp65okzwwt00f2rYibkFPHUv9qBz+Vzn8cB9UXIo9Zc6Dw81LJYhhNt0G/vR1OJEfStZ49NKl0YxQ==",
"version": "1.4.389",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.389.tgz",
"integrity": "sha512-WDgWUOK8ROR7sDFyYmxCUOoDc50lPgYAHAHwnnD1iN3SKO/mpqftb9iIPiEkMKmqYdkrR0j3N/O+YB/U7lSxwg==",
"dev": true
},
"node_modules/emittery": {
@ -3861,11 +3861,12 @@
}
},
"node_modules/le-coffre-resources": {
"resolved": "git+ssh://git@github.com/smart-chain-fr/leCoffre-resources.git#62639b8bfcd0f779357554a04cd40e8a3ba4e62b",
"resolved": "git+ssh://git@github.com/smart-chain-fr/leCoffre-resources.git#30c8ee50b872a8bc6bec0f5d8c4626d8f4490177",
"license": "MIT",
"dependencies": {
"class-transformer": "^0.5.1",
"class-validator": "^0.14.0"
"class-validator": "^0.14.0",
"reflect-metadata": "^0.1.13"
}
},
"node_modules/leven": {

View File

@ -48,7 +48,7 @@
"cors": "^2.8.5",
"express": "^4.18.2",
"jsonwebtoken": "^9.0.0",
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.40",
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.44",
"module-alias": "^2.2.2",
"multer": "^1.4.5-lts.1",
"next": "^13.1.5",

View File

@ -363,7 +363,7 @@ import {
uid: uidDocument1,
blockchain_anchor_uid: null,
depositor_uid: uidCustomer1,
document_status: EDocumentStatus.ASKED,
document_status: EDocumentStatus.DEPOSITED,
folder_uid: uidOfficeFolder1,
document_type_uid: uidDocumentType1,
created_at: new Date(),
@ -433,7 +433,7 @@ import {
},
{
uid: uidFiles2,
document_uid: uidDocument2,
document_uid: uidDocument1,
file_name: "fileName2",
file_path: "https://www.google2.com",
iv: "randomIv2",
@ -481,7 +481,7 @@ import {
uid: uidDocumentHistory1,
document_status: EDocumentStatus.ASKED,
document_uid: uidDocument1,
refused_reason: "Le document n'est pas conforme",
refused_reason: "",
created_at: new Date(),
updated_at: new Date(),
},

View File

@ -27,7 +27,7 @@ export default class CryptoService extends BaseService {
*/
public async encrypt(data: string) {
const encodedData = Buffer.from(data);
const iv = crypto.getRandomValues(new Uint8Array(16));
const iv = crypto.webcrypto.getRandomValues(new Uint8Array(16))
const key = await this.getKey();
const cipherData = await this.subtle.encrypt(
{