A music player that connects to your cloud/distributed storage.
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix string encoding

+7 -3
+7 -3
src/Javascript/crypto.ts
··· 12 12 13 13 14 14 export function keyFromPassphrase(passphrase) { 15 + console.log( 16 + Uint8arrays.fromString(passphrase, "base64pad") 17 + ) 18 + 15 19 return crypto.subtle.importKey( 16 20 "raw", 17 - Uint8arrays.fromString(passphrase, "base64pad"), 21 + Uint8arrays.fromString(passphrase, "utf8"), 18 22 { 19 23 name: "PBKDF2" 20 24 }, ··· 24 28 ).then(baseKey => crypto.subtle.deriveKey( 25 29 { 26 30 name: "PBKDF2", 27 - salt: Uint8arrays.fromString("diffuse", "base64pad"), 31 + salt: Uint8arrays.fromString("diffuse", "utf8"), 28 32 iterations: 10000, 29 33 hash: "SHA-512" 30 34 }, ··· 80 84 ).then( 81 85 buffer => Uint8arrays.toString( 82 86 new Uint8Array(buffer), 83 - "base64pad" 87 + "utf8" 84 88 ) 85 89 86 90 )