Skip to content

Commit

Permalink
chore(publisher): use SHA256 instead of md5
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshallOfSound authored and malept committed Aug 27, 2017
1 parent d208581 commit c69db80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/publish-state.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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) {
Expand Down

0 comments on commit c69db80

Please sign in to comment.