mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 16:53:34 +00:00
support user encryption key
This commit is contained in:
@@ -48,11 +48,12 @@ var TokenRequest = function (email, masterPasswordHash, token, device) {
|
||||
};
|
||||
};
|
||||
|
||||
var RegisterRequest = function (email, masterPasswordHash, masterPasswordHint) {
|
||||
var RegisterRequest = function (email, masterPasswordHash, masterPasswordHint, key) {
|
||||
this.name = null;
|
||||
this.email = email;
|
||||
this.masterPasswordHash = masterPasswordHash;
|
||||
this.masterPasswordHint = masterPasswordHint ? masterPasswordHint : null;
|
||||
this.key = key;
|
||||
};
|
||||
|
||||
var PasswordHintRequest = function (email) {
|
||||
|
||||
@@ -38,6 +38,9 @@ var ProfileResponse = function (response) {
|
||||
this.masterPasswordHint = response.MasterPasswordHint;
|
||||
this.culture = response.Culture;
|
||||
this.twoFactorEnabled = response.TwoFactorEnabled;
|
||||
this.key = response.Key;
|
||||
this.privateKey = response.PrivateKey;
|
||||
this.securityStamp = response.SecurityStamp;
|
||||
|
||||
this.organizations = [];
|
||||
if (response.Organizations) {
|
||||
@@ -68,6 +71,7 @@ var IdentityTokenResponse = function (response) {
|
||||
this.tokenType = response.token_type;
|
||||
|
||||
this.privateKey = response.PrivateKey;
|
||||
this.key = response.Key;
|
||||
};
|
||||
|
||||
var ListResponse = function (data) {
|
||||
|
||||
@@ -9,13 +9,8 @@ var CipherString = function () {
|
||||
var constants = chrome.extension.getBackgroundPage().constantsService;
|
||||
|
||||
if (arguments.length >= 2) {
|
||||
// ct and optional header
|
||||
if (arguments[0] === constants.encType.AesCbc256_B64) {
|
||||
this.encryptedString = arguments[1];
|
||||
}
|
||||
else {
|
||||
this.encryptedString = arguments[0] + '.' + arguments[1];
|
||||
}
|
||||
// ct and header
|
||||
this.encryptedString = arguments[0] + '.' + arguments[1];
|
||||
|
||||
// iv
|
||||
if (arguments.length > 2 && arguments[2]) {
|
||||
|
||||
Reference in New Issue
Block a user