custom-media: add converter to CyTube Media object

This commit is contained in:
Calvin Montgomery 2017-08-07 21:44:55 -07:00
parent 8b7cdfd4c3
commit f4ce2fe69d
5 changed files with 131 additions and 2 deletions

7
src/util/hash.js Normal file
View file

@ -0,0 +1,7 @@
import { createHash } from 'crypto';
export function hash(algo, input, digest) {
const h = createHash(algo);
h.update(input);
return h.digest(digest);
}