Class: Wx::SecretValue
- Inherits:
-
Object
- Object
- Wx::SecretValue
- Defined in:
- lib/wx/doc/gen/secret_store.rb,
lib/wx/doc/secret_store.rb
Overview
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.
This class is untracked and should not be derived from nor instances extended!
Represents the value of a secret in SecretStore.
Immutable value-like class which tries to ensure that the secret value will be removed once it’s not needed any more.
Category: Miscellaneous
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
Compare with another secret for equality.
-
#get_as_string ⇒ String
Returns a copy of the secret data as an UTF-8 encoded String.
-
#get_data ⇒ String
Returns a copy of the secret data as an ASCII-8BIT encoded String.
-
#initialize(*args) ⇒ SecretValue
constructor
A new instance of SecretValue.
-
#is_ok ⇒ Boolean
(also: #ok?)
Check if a secret is not empty.
Constructor Details
#initialize ⇒ Wx::SecretValue #initialize(secret) ⇒ Wx::SecretValue #initialize(other) ⇒ Wx::SecretValue
Returns a new instance of SecretValue.
38 |
# File 'lib/wx/doc/secret_store.rb', line 38 def initialize(*args) end |
Instance Method Details
#==(other) ⇒ Boolean
Compare with another secret for equality.
111 |
# File 'lib/wx/doc/gen/secret_store.rb', line 111 def ==(other) end |
#get_as_string ⇒ String
Returns a copy of the secret data as an UTF-8 encoded String. Make sure to use this method only if sure that the secret originally stored was indeed UTF-8 data as otherwise the returned string will not match the stored data. For more security Wx::SecretStore.wipe should be used to wipe the secret data after use.
51 |
# File 'lib/wx/doc/secret_store.rb', line 51 def get_as_string; end |
#get_data ⇒ String
Returns a copy of the secret data as an ASCII-8BIT encoded String. Be aware this could be binary data and may contain embedded NUL characters. For more security Wx::SecretStore.wipe should be used to wipe the secret data after use.
44 |
# File 'lib/wx/doc/secret_store.rb', line 44 def get_data; end |
#is_ok ⇒ Boolean Also known as: ok?
Check if a secret is not empty.
105 |
# File 'lib/wx/doc/gen/secret_store.rb', line 105 def is_ok; end |