You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
834 B
JavaScript
27 lines
834 B
JavaScript
10 years ago
|
//TODO: Remove almost everything here...
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
;(function() {
|
||
|
window.axolotl = window.axolotl || {};
|
||
|
window.axolotl.api = {
|
||
|
getMyIdentifier: function() {
|
||
|
return textsecure.utils.unencodeNumber(textsecure.storage.getUnencrypted("number_id"))[0];
|
||
|
},
|
||
|
isIdentifierSane: function(identifier) {
|
||
|
return textsecure.utils.isNumberSane(identifier);
|
||
|
},
|
||
|
storage: {
|
||
|
put: function(key, value) {
|
||
|
return textsecure.storage.putEncrypted(key, value);
|
||
|
},
|
||
|
get: function(key, defaultValue) {
|
||
|
return textsecure.storage.getEncrypted(key, defaultValue);
|
||
|
},
|
||
|
remove: function(key) {
|
||
|
return textsecure.storage.removeEncrypted(key);
|
||
|
},
|
||
|
},
|
||
|
};
|
||
|
})();
|