mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-04 19:59:54 +08:00
11 lines
301 B
JavaScript
11 lines
301 B
JavaScript
const md5 = require('@/utils/md5');
|
|
|
|
function hash(images) {
|
|
const entries = Object.entries(images)
|
|
.map((x) => [`${x[1].os}/${x[1].architecture}`, x[1].digest])
|
|
.sort((a, b) => a[0] - b[0]);
|
|
return md5(entries.map((x) => x.join(',')).join('|'));
|
|
}
|
|
|
|
module.exports = { hash };
|