Sha256: b263d4cf2a5efa1d12330445b56ba83e2180fef5e7880e185ba95b163bd8272e
Contents?: true
Size: 1.8 KB
Versions: 9
Compression:
Stored size: 1.8 KB
Contents
--- :wxSecretStore: :detail: :pre: :programlisting: - :pattern: !ruby/regexp /\!store\..*Save.*username.*password\)/ :replace: | ```ruby store = Wx::SecretStore.get_default rc, err = store.ok? if rc unless store.save('MyApp/MyService', username, password) Wx.log_warning('Failed to save credentials to the system secret store.') end else Wx.log_warning("This system doesn't support storing passwords securely (#{err}).") end ``` - :pattern: !ruby/regexp /store\..*Load.*username.*password\)/ :replace: | ```ruby store = Wx::SecretStore.get_default rc, _ = store.ok? if rc password = Wx::SecretValue.new rc, username = store.load('MyApp/MyService', password) if rc # ... use the password ... end end ``` :wxSecretStore.IsOk: :brief: :replace: :text: | Check if this object can actually be used. Returns true if the object can be used. Returns false and an error message describing the reason if not. :wxSecretStore.Load: :detail: :post: - :pattern: !ruby/regexp /Otherwise\s+the\s+function.*arguments\./ :subst: | Otherwise the function returns true and the username and updates the provided password argument. :wxSecretValue: :detail: :post: - :pattern: !ruby/regexp /\s+\Z/ :subst: | @note Due to a bug using binary secrets will not work for WXGTK wxWidgets<=3.2.4 (WXOSX and WXMSW work fine). This has been fixed for later versions.
Version data entries
9 entries across 9 versions & 1 rubygems