Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat] Adds support for large assets (> 100 MB) (#3194)
* Updates crypto library * missed one * Using charCodeAt instead of TextEncoder * updated lock * Using hash.js for the browser build * review
- Loading branch information
1 parent
b123169
commit b4c8b43
Showing
8 changed files
with
34 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import sha256 from 'hash.js/lib/hash/sha/256'; | ||
|
||
export const createHash = () => sha256(); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { createHash as cryptoCreateHash } from 'crypto'; | ||
|
||
export const createHash = () => cryptoCreateHash('sha256'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
declare module 'hash.js/lib/hash/sha/256' { | ||
export default function sha256(): { | ||
update: (data: any) => void; | ||
digest: (format: string) => string; | ||
update: (data: any) => void; | ||
}; | ||
} |