Last active
November 12, 2019 14:23
-
-
Save adamTrz/ebc8e2742a7e6c4ff0320d2cc54760b0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let aes256key: ?Array<number>; | |
| sha256([brand, deviceId, ...otherIds].join('')).then( | |
| (hash: string) => { | |
| aes256key = Array.from( | |
| Array.from(hash) | |
| .map((c, i) => (i % 2 ? c : null)) | |
| .filter(Boolean) | |
| .map(c => c.charCodeAt(0)) | |
| ); | |
| } | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment