mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-04 23:14:56 +01:00
33 lines
549 B
JavaScript
33 lines
549 B
JavaScript
var mockHex = '0xabcdef0123456789'
|
|
var mockKey = new Buffer(32)
|
|
let cacheVal
|
|
|
|
module.exports = {
|
|
|
|
encrypt (password, dataObj) {
|
|
cacheVal = dataObj
|
|
return Promise.resolve(mockHex)
|
|
},
|
|
|
|
decrypt (password, text) {
|
|
return Promise.resolve(cacheVal || {})
|
|
},
|
|
|
|
encryptWithKey (key, dataObj) {
|
|
return this.encrypt(key, dataObj)
|
|
},
|
|
|
|
decryptWithKey (key, text) {
|
|
return this.decrypt(key, text)
|
|
},
|
|
|
|
keyFromPassword (password) {
|
|
return Promise.resolve(mockKey)
|
|
},
|
|
|
|
generateSalt () {
|
|
return 'WHADDASALT!'
|
|
},
|
|
|
|
}
|