Initial commit
This commit is contained in:
1
public/models/.gitattributes
vendored
Normal file
1
public/models/.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.glb filter=lfs diff=lfs merge=lfs -text
|
||||
BIN
public/models/char_enviorment.hdr
Normal file
BIN
public/models/char_enviorment.hdr
Normal file
Binary file not shown.
BIN
public/models/character.enc
Normal file
BIN
public/models/character.enc
Normal file
Binary file not shown.
3
public/models/character.glb
Normal file
3
public/models/character.glb
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c287a4d10bbbbc4c779f7b0a68b666b530ef9754142843aa048b4d5976c0d052
|
||||
size 1537316
|
||||
16
public/models/encrypt.cjs
Normal file
16
public/models/encrypt.cjs
Normal file
@@ -0,0 +1,16 @@
|
||||
const crypto = require("crypto");
|
||||
const fs = require("fs");
|
||||
|
||||
const encryptFile = (inputFile, outputFile, password) => {
|
||||
const key = crypto.createHash("sha256").update(password).digest();
|
||||
const iv = crypto.randomBytes(16);
|
||||
|
||||
const cipher = crypto.createCipheriv("aes-256-cbc", key, iv);
|
||||
const input = fs.createReadStream(inputFile);
|
||||
const output = fs.createWriteStream(outputFile);
|
||||
|
||||
output.write(iv);
|
||||
input.pipe(cipher).pipe(output);
|
||||
};
|
||||
|
||||
encryptFile("character.glb", "character.enc", "Character3D#@");
|
||||
Reference in New Issue
Block a user