Class: Virgil::SDK::HighLevel::VirgilAppCredentials

Inherits:
Object
  • Object
show all
Defined in:
lib/virgil/sdk/high_level/virgil_app_credentials.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app_id:, app_key_data:, app_key_password:) ⇒ VirgilAppCredentials

Returns a new instance of VirgilAppCredentials.



40
41
42
43
44
# File 'lib/virgil/sdk/high_level/virgil_app_credentials.rb', line 40

def initialize(app_id:, app_key_data:, app_key_password:)
  @app_id = app_id
  @app_key_data = app_key_data
  @app_key_password = app_key_password
end

Instance Attribute Details

#app_idObject (readonly)

Returns the value of attribute app_id.



38
39
40
# File 'lib/virgil/sdk/high_level/virgil_app_credentials.rb', line 38

def app_id
  @app_id
end

#app_key_dataObject (readonly)

Returns the value of attribute app_key_data.



38
39
40
# File 'lib/virgil/sdk/high_level/virgil_app_credentials.rb', line 38

def app_key_data
  @app_key_data
end

#app_key_passwordObject (readonly)

Returns the value of attribute app_key_password.



38
39
40
# File 'lib/virgil/sdk/high_level/virgil_app_credentials.rb', line 38

def app_key_password
  @app_key_password
end

Instance Method Details

#app_key(crypto) ⇒ Object



46
47
48
# File 'lib/virgil/sdk/high_level/virgil_app_credentials.rb', line 46

def app_key(crypto)
  crypto.import_private_key(app_key_data.bytes, app_key_password)
end