add tests to getSEssionId
This commit is contained in:
parent
54bc98f0bd
commit
5753f406e0
2 changed files with 210 additions and 198 deletions
|
|
@ -100,7 +100,7 @@ Storage.prototype.removeGlobal = function(k) {
|
|||
Storage.prototype.getSessionId = function() {
|
||||
var sessionId = this.sessionStorage.getItem('sessionId');
|
||||
if (!sessionId) {
|
||||
sessionId = bitcore.getRandomBuffer(8).toString('hex');
|
||||
sessionId = bitcore.SecureRandom.getRandomBuffer(8).toString('hex');
|
||||
this.sessionStorage.setItem(sessionId, 'sessionId');
|
||||
}
|
||||
return sessionId;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue