How to Generate KeyStore in Flutter | Visual Studio Code

What is a KeyStore?

A KeyStore is nothing more than a repository, database, or collection of key pairs, secret keys, or certificates. A KeyStore is referred to as a TrustStore when it simply stores certificates. It is referred to be a KeyStore when Private Keys are included with their accompanying Certificate chain (Key Pair or asymmetric keys).

The JCE provider supports a variety of KeyStore kinds, including; JKS, JCEKS, and PKCS12. Although their functions are often employed for the following:

  1. Java KeyStore (JKS) – Security measures for your Web Server.
  2. Java Enhanced Key Store (JCEKS) – can save the same information that JKS can keep and in addition, your symmetric encryption keys, and it can also be used to secure a web server.
  3. PKCS12 – Along with their certificate chains, they can also contain private keys. However, the norm calls for a single entry, or a single private key and the certificate chain that goes with it.

Generating a KeyStore in Flutter in Visual Studio Code

  1. Open your VS Code. In the Terminal, copy and paste the command below then press Enter.
keytool -genkey -v -keystore D:\keystore\samplekeystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key
  • The line <-keystore D:\keystore\samplekeystore.jks> is the file location, folder, and filename of the keystore that will be generated.
  1. Enter your password for your keystore and press Enter.
  2. You may fill-out the following details, but if you have decided not to, just press Enter till you arrive to
    <Is CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown correct? [no]>
    and type in ‘yes‘.
  1. After waiting. the keystore is now generated and you’re done.

StackOverflow. (May, 2017). What is the purpose of KeyStore. Retrieved form:

Leave a Comment

Your email address will not be published. Required fields are marked *