Package | Description |
---|---|
be.ac.ulb.infof307.g02.controllers | |
be.ac.ulb.infof307.g02.database | |
be.ac.ulb.infof307.g02.utils |
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 java.util.List<Product> |
ImportArticlesController.getImportableProducts() |
private boolean |
EditAccountController.isPasswordCorrect(java.lang.String password)
Checks if the password match with the one of the logged in user
|
protected void |
GroceryListSelectionController.onDelete(java.lang.String listName)
Deletes a groceryList from the database
|
protected abstract void |
SelectionController.onDelete(java.lang.String toDelete) |
protected void |
RecipeSelectionController.onDelete(java.lang.String recipeName)
Deletes a recipe from the database
|
private void |
RecipeController.saveOrOverWriteGroceryListInDb(GroceryList groceryList)
Saves the grocery list to the database.
|
private java.lang.String |
EditAccountController.updatePassword(java.lang.String newPassword)
Updates the password of the logged in User.
|
Modifier and Type | Method and Description |
---|---|
void |
GroceryListDB.deleteGroceryList(User listOwner,
java.lang.String listName)
Delete a GroceryList from the database
|
void |
RecipeDB.deleteRecipe(User recipeOwner,
java.lang.String recipeName)
Deletes a Recipe from the database
|
java.util.List<Product> |
ProductDB.getAllProducts()
Retrieve all the products 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
|
java.util.List<Shop> |
ShopDB.getAllShops()
Gets all the shops from the database
|
private byte[] |
KeyDB.getBytes(java.lang.String userName,
java.lang.String columnName)
Fetches the bytes in the given column of the Key table for the given user
|
byte[] |
KeyDB.getEncryptedAESKey(java.lang.String userName)
Return user's encrypted AES key
|
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
|
Product |
ProductDB.getProduct(java.lang.String productName)
Retrieve the product "productName" from the database
|
java.security.PublicKey |
KeyDB.getPublicKey(java.lang.String userName)
Return user's RSA public key
|
Recipe |
RecipeDB.getRecipe(User recipeOwner,
java.lang.String recipeName)
Get a Recipe from the database
|
byte[] |
KeyDB.getSalt(java.lang.String userName)
Return the user's salt.
|
User |
UserDB.getUserByName(java.lang.String userName)
Return the User with the given user name.
|
void |
UserDB.updatePassword(java.lang.String userName,
java.lang.String newHashedPassword)
Allows updating the password of a user in the database.
|
Modifier and Type | Method and Description |
---|---|
private javax.crypto.SecretKey |
Crypto.getAesKey(User user)
Returns the (unencrypted) AES key
|
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.
|