mirror of https://gitlab.com/ecentrics/concordia
Apostolos Fanakis
4 years ago
2 changed files with 7 additions and 6 deletions
@ -1,7 +1,8 @@ |
|||
import sha256 from 'crypto-js/sha256'; |
|||
|
|||
function generateHash(message) { |
|||
return sha256(message).toString().substring(0, 16); |
|||
} |
|||
const generateHash = (message) => sha256(message).toString().substring(0, 16); |
|||
|
|||
export default generateHash; |
|||
const generatePollHash = (pollQuestion, pollOptions) => generateHash(JSON |
|||
.stringify({ question: pollQuestion, optionValues: pollOptions })); |
|||
|
|||
export default generatePollHash; |
|||
|
Loading…
Reference in new issue