u
This commit is contained in:
5
src/util/newFullHash.js
Normal file
5
src/util/newFullHash.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import { randomBytes } from 'node:crypto';
|
||||
|
||||
export default function newFullHash() {
|
||||
return randomBytes(32).toString('hex');
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
import { createHash } from 'node:crypto';
|
||||
import sharp from 'sharp';
|
||||
import { rgbaToThumbHash } from 'thumbhash';
|
||||
|
||||
@@ -59,7 +58,6 @@ export default async function processAvifImage(inputBuffer) {
|
||||
h: full.info.height,
|
||||
size: full.data.length,
|
||||
buffer: full.data,
|
||||
hash: createHash('sha256').update(full.data).digest('hex'),
|
||||
},
|
||||
thumb: {
|
||||
w: thumb.info.width,
|
||||
|
||||
Reference in New Issue
Block a user