Create seed data

Seed data is important to populate the database with initial values. In the context of Vaulteron, we need to generate a key pair and perform encryption using user credentials. This is how you create the seed data:


  • The cryptoManager must be in the window-object must be globally available (see file cryptoManager).
  • Adjust the login password in the following code snippet as needed.
window.globalCryptoManager.createAsynchronousKeyPair().then(kp => {
let loginPW = "12345";
let userName = "Mako";
let result = "";
result += `public const string ${userName}PublicKey = @"${kp.publicKey}";`;
result += `public const string ${userName}PrivateKey = @"${kp.privateKey}";`;
window.globalCryptoManager.encryptUsingUserCredentials(kp.privateKey, loginPW).then(privKey => {
result += `public const string ${userName}EncryptedPrivateKey = @"${privKey}";`;

By following these instructions, you can successfully set up the database, handle potential migration errors, and generate seed data for the Vaulteron client app built with React. This provides a solid foundation for building a secure and efficient platform for managing sensitive information.


Xeas GmbH - Vaulteron
Neubaugasse 24,
8020 Graz