Class: VerifySRPService

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_home/http/services/verify_srp_service.rb

Instance Method Summary collapse

Constructor Details

#initialize(public_key:, device_proof:, srp_session:) ⇒ VerifySRPService

Returns a new instance of VerifySRPService.



2
3
4
5
6
# File 'lib/ruby_home/http/services/verify_srp_service.rb', line 2

def initialize(public_key: , device_proof: , srp_session: )
  @device_proof = device_proof
  @srp_session = srp_session
  @public_key = public_key
end

Instance Method Details

#server_proofObject



21
22
23
# File 'lib/ruby_home/http/services/verify_srp_service.rb', line 21

def server_proof
  verify_session_bytes
end

#session_keyObject



17
18
19
# File 'lib/ruby_home/http/services/verify_srp_service.rb', line 17

def session_key
  srp_verifier.K
end

#valid?Boolean

Returns:

  • (Boolean)


8
9
10
11
12
13
14
15
# File 'lib/ruby_home/http/services/verify_srp_service.rb', line 8

def valid?
  return false unless public_key
  return false unless device_proof
  return false unless srp_session
  return false unless valid_session?

  true
end