Skip to content

Commit

Permalink
Remove use of keytar module
Browse files Browse the repository at this point in the history
  • Loading branch information
satoshinm committed Dec 16, 2017
1 parent 2e66a27 commit 86eec63
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
"buffer-reader": "^0.1.0",
"enum": "^2.4.0",
"fast-srp-hap": "^1.0.1",
"keytar": "^4.0.2",
"message-socket": "^1.0.3",
"node-hkdf-sync": "^1.0.0",
"rxjs": "^5.3.0",
Expand Down
12 changes: 11 additions & 1 deletion src/SecureStore.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
import { Observable } from 'rxjs';
import Keytar from 'keytar';

const debug = require('debug')('hap-client:securestore');

const fs = require('fs');
class Keytar {
getPassword(service, account) {
return fs.readFileSync(`password-${account}`, 'utf8');
}

setPassword(service, account, password) {
fs.writeFileSync(`password-${account}`, password, 'utf8');
}
}

function loadClient(clientName) {
return Observable
.defer(
Expand Down

0 comments on commit 86eec63

Please sign in to comment.