-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SHA512 do not match #69
Labels
awaiting-reply
Awaiting reply
fix-available
A fix to the issue is available in a new version
question
Further information is requested
Comments
Or do these SHA512 hashes refer to something else? |
Hey @hbarsaiyan, thanks for submitting the issue! The release/update process comes from electron-builder - you can verify checksums in different ways:
$ sha512sum YouTube-Music-1.6.4.AppImage | cut -f1 -d\ | xxd -r -p | base64 -w 0
2bdeFR5gm96WlMlg97n/QPFoHTOLV12GlIeApvR6WlgYO1UG6eDCKzlZRoLTn+obQNlp3746Mu3hFJKwbJa/yw==
const path = require('path');
const fs = require('fs');
const crypto = require('crypto');
const YOUR_FILE_PATH = 'YouTube-Music-1.6.4.AppImage';
function hashFile(file, algorithm = 'sha512', encoding = 'base64', options) {
return new Promise((resolve, reject) => {
const hash = crypto.createHash(algorithm);
hash.on('error', reject).setEncoding(encoding);
fs.createReadStream(
file,
Object.assign({}, options, {
highWaterMark: 1024 * 1024,
/* better to use more memory but hash faster */
})
)
.on('error', reject)
.on('end', () => {
hash.end();
console.log(hash.read());
resolve(hash.read());
})
.pipe(
hash,
{
end: false,
}
);
});
}
const installerPath = path.resolve(
__dirname,
YOUR_FILE_PATH
);
hashFile(installerPath); $ node hash.js
2bdeFR5gm96WlMlg97n/QPFoHTOLV12GlIeApvR6WlgYO1UG6eDCKzlZRoLTn+obQNlp3746Mu3hFJKwbJa/yw== Does it answer your question? |
@th-ch thanks for the detailed explanation. I didn't about Base64 hash encoding. |
This was referenced Feb 14, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
awaiting-reply
Awaiting reply
fix-available
A fix to the issue is available in a new version
question
Further information is requested
The SHA512 checksum of the AppImages releases are different from that mentioned in latest-linux.yml. For eg. in 1.6.4:
in latest-linux.yml:
sha512: 2bdeFR5gm96WlMlg97n/QPFoHTOLV12GlIeApvR6WlgYO1UG6eDCKzlZRoLTn+obQNlp3746Mu3hFJKwbJa/yw==
The text was updated successfully, but these errors were encountered: