private void reencryptVaultValues ( final ChangePasswordRequest serviceRequest , final UserAccount userAccount ) { final String authKey = vaultManager . getEncryptedValue ( serviceRequest . getCurrentPassword ( ) , userAccount ) ; if ( authKey != null ) { final EncryptedValue encryptedValue = encryptedValueDAO . findFirstByProperty ( EncryptedValue_ . userId , userAccount . getUserId ( ) ) ; encryptedValue . setStorage ( vaultManager . encryptValue ( serviceRequest . getNewPassword ( ) , userAccount . getUserId ( ) , authKey ) ) ; encryptedValueDAO . merge ( encryptedValue ) ; } }
Reencrypt vault values .