Package | Description |
---|---|
be.ac.ulb.infof307.g02.controllers | |
be.ac.ulb.infof307.g02.database | |
be.ac.ulb.infof307.g02.models | |
be.ac.ulb.infof307.g02.utils |
Modifier and Type | Method and Description |
---|---|
User |
ControllerMaster.getUser() |
Modifier and Type | Method and Description |
---|---|
private boolean |
LoginController.areCredentialsCorrect(User newUser)
Consults the database to see if the credentials of a user are
correct.
|
private void |
LoginController.connectUser(User user)
Connects a user to the application
|
void |
ControllerMaster.setUser(User user) |
Modifier and Type | Method and Description |
---|---|
User |
UserDB.getUserByName(java.lang.String userName)
Return the User with the given user name.
|
Modifier and Type | Method and Description |
---|---|
void |
GroceryListDB.addGroceryList(User listOwner,
GroceryList list)
Insert a new GroceryList in the database
|
void |
GroceryListDB.addItemToGroceryList(User listOwner,
java.lang.String listName,
ProductAmount item)
Add a GroceryListItem to a given GroceryList
|
void |
RecipeDB.addProductAmountToRecipe(User recipeOwner,
java.lang.String recipeName,
ProductAmount item)
Add a ProductAmount to a given Recipe
|
void |
RecipeDB.addRecipe(User recipeOwner,
Recipe recipe)
Insert a new Recipe in the database
|
void |
UserDB.addUser(User user)
Inserts a new entry in the database.
|
private void |
KeyStorer.deleteAllPublicInfo(User updatedUser)
Delete user's salt, RSA public key and encrypted AES key .
|
void |
GroceryListDB.deleteGroceryList(User listOwner,
java.lang.String listName)
Delete a GroceryList from the database
|
private void |
KeyStorer.deletePrivateKey(User oldUser)
Delete the user's RSA private key
|
void |
KeyDB.deletePublicData(User updatedUser)
Delete the user's public data (RSA public key, encrypted AES key, salt) from the key table
|
void |
RecipeDB.deleteRecipe(User recipeOwner,
java.lang.String recipeName)
Deletes a Recipe from the database
|
private java.lang.String |
KeyStorer.getAliasForPrivateKey(User user)
Returns the alias for the user's private key - the alias is used to store/fetch the key in the keystore.jks file
|
java.util.List<java.lang.String> |
GroceryListDB.getAllGroceryListsName(User owner)
Get all the names of the GroceryLists of a user from the database
|
java.util.List<java.lang.String> |
RecipeDB.getAllRecipesName(User owner)
Gets all the names of the Recipes of a user from the database
|
byte[] |
KeyStorer.getEncryptedAESKey(User user)
Return user's encrypted AES key
|
GroceryList |
GroceryListDB.getGroceryList(User listOwner,
java.lang.String listName)
Get a GroceryList from the database
|
java.security.KeyPair |
KeyStorer.getKeyPair(User user)
Return the user's RSA key pair
|
private java.security.PrivateKey |
KeyStorer.getPrivateKey(User user)
Return user's RSA private key
|
Recipe |
RecipeDB.getRecipe(User recipeOwner,
java.lang.String recipeName)
Get a Recipe from the database
|
private javafx.util.Pair<java.lang.Integer,java.lang.String> |
RecipeDB.getRecipeGeneralInfos(java.lang.String recipeName,
User recipeOwner)
Gets the Instructions of a recipe and the number of people from the database
|
private java.util.List<ProductAmount> |
RecipeDB.getRecipeProductAmounts(java.lang.String recipeName,
User recipeOwner)
Gets all the ProductAmounts of a recipe
|
void |
KeyStorer.storeAllKeys(java.security.KeyPair keyPair,
byte[] encryptedAESKey,
User user)
Store the user's key chain (RSA keypair, encrypted AES key and salt)
|
private void |
KeyStorer.storePrivateKey(java.security.PrivateKey privateKey,
User user,
byte[] salt)
Store user's private key in the keystore.jks file
|
void |
KeyStorer.updateAllKeys(java.security.KeyPair keyPair,
byte[] encryptedAesKey,
User oldUser,
User updatedUser)
Update user's keys (required when they change their password or username).
|
Modifier and Type | Field and Description |
---|---|
private User |
Session.user |
Modifier and Type | Method and Description |
---|---|
User |
Session.getUser() |
Modifier and Type | Method and Description |
---|---|
boolean |
User.passwordMatches(User newUser) |
void |
Session.setUser(User updatedUser) |
Constructor and Description |
---|
Session(User user) |
User(User user) |
Modifier and Type | Method and Description |
---|---|
private javax.crypto.SecretKey |
Crypto.getAesKey(User user)
Returns the (unencrypted) AES key
|
void |
Crypto.regenerateKeys(User oldUser,
User updatedUser)
Regenerate new RSA keys, re-encrypt the AES key using the new RSA Public Key then store all the keys.
|
static void |
CryptoSingleton.setupCryptoForUser(User user)
Creates a new Crypto instance when user logs in, which fetches all the required key information
|
static void |
CryptoSingleton.setupCryptoForUser(User user,
DatabaseConnection databaseConnection)
Creates a new Crypto instance when user logs in, which fetches all the required key information
|
static void |
CryptoSingleton.updateUserKeys(User oldUser,
User updatedUser)
Regenerates the user's keys, stores the new information and creates a new Crypto instance
with the new keys.
|
static void |
CryptoSingleton.updateUserKeys(User oldUser,
User updatedUser,
DatabaseConnection databaseConnection)
Regenerates the user's keys, stores the new information and creates a new Crypto instance
with the new keys.
|
Constructor and Description |
---|
Crypto(User user,
DatabaseConnection databaseConnection)
Initializes cryptography for the given user, fetching their keys from the database and the keystore file.
|