mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
generate enc key on registration
This commit is contained in:
@@ -42,13 +42,15 @@ angular
|
||||
|
||||
var email = $scope.model.email.toLowerCase();
|
||||
var key = cryptoService.makeKey($scope.model.masterPassword, email);
|
||||
var encKey = cryptoService.makeEncKey(key);
|
||||
|
||||
$scope.registerPromise = cryptoService.makeKeyPair(key).then(function (result) {
|
||||
$scope.registerPromise = cryptoService.makeKeyPair(encKey.encKey).then(function (result) {
|
||||
var request = {
|
||||
name: $scope.model.name,
|
||||
email: email,
|
||||
masterPasswordHash: cryptoService.hashPassword($scope.model.masterPassword, key),
|
||||
masterPasswordHint: $scope.model.masterPasswordHint,
|
||||
key: encKey.encKeyEnc,
|
||||
keys: {
|
||||
publicKey: result.publicKey,
|
||||
encryptedPrivateKey: result.privateKeyEnc
|
||||
|
||||
Reference in New Issue
Block a user