Quick Start with Local Storage

  1. Initialize the library:

  2. Generate a new encryption key to encrypt and decrypt passwords or other data:

    key = cip.create_key()
    

    If the key has already been saved, you don’t need to regenerate it. To retrieve the key, use:

    key = cip.load_key()
    
  3. Save the key to a file key.properties:

    cip.save_key(key)
    
  4. Encrypt passwords and data:

    e_password = cip.encrypt("seccure password")
    
  5. Decrypt the password:

    e_decrypt = cip.decrypt(b'gAAAAABngEQFmQDVnv_70wulu1lv5NwokxT-bi8XcizL1xH9oBiG-sqIWKV_RNubaQpF4z94Hbo5sSmSkH-W0YQDLN8w2cFKYw==')