Skip to content
Permalink
Browse files

chore(publisher): use SHA256 instead of md5

  • Loading branch information
MarshallOfSound authored and malept committed Aug 27, 2017
1 parent d208581 commit c69db80fb407b53fe60094cb8040510bb867bf34
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/util/publish-state.js
@@ -31,7 +31,7 @@ export default class PublishState {
}

static async saveToDirectory(directory, artifacts) {
const id = crypto.createHash('md5').update(JSON.stringify(artifacts)).digest('hex');
const id = crypto.createHash('SHA256').update(JSON.stringify(artifacts)).digest('hex');
for (const artifact of artifacts) {
const state = new PublishState(path.resolve(directory, id, 'null'), '', false);
state.setState(artifact);
@@ -47,7 +47,7 @@ export default class PublishState {

generateHash() {
const content = JSON.stringify(this.state || {});
return crypto.createHash('md5').update(content).digest('hex');
return crypto.createHash('SHA256').update(content).digest('hex');
}

setState(state) {

0 comments on commit c69db80

Please sign in to comment.
You can’t perform that action at this time.