Class SharedPreferencesKeyStore

    • Field Detail

      • DEFAULT_PREF_NAME

        public static final String DEFAULT_PREF_NAME
        Default name used for the shared preferences store
        See Also:
        Constant Field Values
    • Constructor Detail

      • SharedPreferencesKeyStore

        public SharedPreferencesKeyStore​(@NonNull
                                         Context context)
        Creates a new store that persists the KeySetIds in a Context.MODE_PRIVATE shared preferences using the DEFAULT_PREF_NAME
        Parameters:
        context - the context
      • SharedPreferencesKeyStore

        public SharedPreferencesKeyStore​(@NonNull
                                         Context context,
                                         @NonNull
                                         String name)
        Creates a new store that persists the KeySetIds in a Context.MODE_PRIVATE shared preferences using the given name.
        Parameters:
        context - the context
        name - the name used to create the shared preferences
      • SharedPreferencesKeyStore

        public SharedPreferencesKeyStore​(@NonNull
                                         SharedPreferences sharedPreferences)
        Creates a new store that uses the given shared preferences as backend.
        Parameters:
        sharedPreferences - the backend preferences that are used to persist the entries
    • Method Detail

      • getLicenseKeysCount

        public int getLicenseKeysCount()
        Description copied from class: KeyStore
        Get count of stored license keys
        Specified by:
        getLicenseKeysCount in class KeyStore
        Returns:
        count of stored keys