use Blake3 instead of SHA-1 or Blake2b

Benefits:

* Blake3 is faster. This is most noticeable for the hashing of the
  sample file data.
* we no longer need OpenSSL, which helps with shrinking the binary size
  (#70). sha1 basically forced OpenSSL usage; ring deliberately doesn't
  support this old algorithm, and the pure-Rust sha1 crate is painfully
  slow. OpenSSL might still be a better choice than ring/rustls for TLS
  but it's nice to have the option.

For the video sample entries, I decided we don't need to hash at all. I
think the id number is sufficiently stable, and it's okay---perhaps even
desirable---if an existing init segment changes for fixes like e5b83c2.
This commit is contained in:
Scott Lamb
2020-03-20 20:52:30 -07:00
parent e5b83c21e1
commit 00991733f2
18 changed files with 248 additions and 187 deletions

View File

@@ -71,9 +71,6 @@ export default class Recording {
/** @const {!number} */
this.videoSamples = recordingJson.videoSamples;
/** @const {!string} */
this.videoSampleEntrySha1 = videoSampleEntryJson.sha1;
/** @const {!number} */
this.videoSampleEntryWidth = videoSampleEntryJson.width;