Compare commits

...

3 Commits

Author SHA1 Message Date
semantic-release-bot a2b5f3e539 chore(release): 0.1.0-develop.72 [skip ci]
# [0.1.0-develop.72](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.71...v0.1.0-develop.72) (2023-11-18)

### Bug Fixes

* ensure axios returns binary data ([518bbcd](518bbcdd94))
2023-11-18 12:04:10 +00:00
Derrick Hammer 968459d1c0
Merge remote-tracking branch 'origin/develop' into develop 2023-11-18 07:03:32 -05:00
Derrick Hammer 518bbcdd94
fix: ensure axios returns binary data 2023-11-18 07:03:29 -05:00
4 changed files with 12 additions and 4 deletions

View File

@ -1,3 +1,10 @@
# [0.1.0-develop.72](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.71...v0.1.0-develop.72) (2023-11-18)
### Bug Fixes
* ensure axios returns binary data ([518bbcd](https://git.lumeweb.com/LumeWeb/libs5/commit/518bbcdd946ef92f8a5195f6684d11fdce7bbd50))
# [0.1.0-develop.71](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.70...v0.1.0-develop.71) (2023-11-18)

4
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@lumeweb/libs5",
"version": "0.1.0-develop.71",
"version": "0.1.0-develop.72",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@lumeweb/libs5",
"version": "0.1.0-develop.71",
"version": "0.1.0-develop.72",
"dependencies": {
"@noble/curves": "^1.1.0",
"@noble/hashes": "^1.3.1",

View File

@ -1,6 +1,6 @@
{
"name": "@lumeweb/libs5",
"version": "0.1.0-develop.71",
"version": "0.1.0-develop.72",
"type": "module",
"main": "lib/index.js",
"repository": {

View File

@ -224,10 +224,11 @@ export class S5Node {
try {
const res = await axios.get(dlUri.location.bytesUrl, {
timeout: 30000, // Adjust timeout as needed
responseType: "arraybuffer",
});
// Assuming rust.hashBlake3 and areBytesEqual are available functions
const resHash = blake3(res.data);
const resHash = blake3(Buffer.from(res.data));
if (!equalBytes(hash.hashBytes, resHash)) {
throw new Error("Integrity verification failed");