Class: MTProto::TL::CheckPassword

Inherits:
Object
  • Object
show all
Includes:
Binary
Defined in:
lib/mtproto/tl/objects/check_password.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Binary

#b_u32, #b_u64, #u32_b, #u64_b

Constructor Details

#initialize(srp_id:, a:, m1:) ⇒ CheckPassword

Returns a new instance of CheckPassword.



10
11
12
13
14
# File 'lib/mtproto/tl/objects/check_password.rb', line 10

def initialize(srp_id:, a:, m1:)
  @srp_id = srp_id
  @a = a
  @m1 = m1
end

Instance Attribute Details

#aObject (readonly)

Returns the value of attribute a.



8
9
10
# File 'lib/mtproto/tl/objects/check_password.rb', line 8

def a
  @a
end

#m1Object (readonly)

Returns the value of attribute m1.



8
9
10
# File 'lib/mtproto/tl/objects/check_password.rb', line 8

def m1
  @m1
end

#srp_idObject (readonly)

Returns the value of attribute srp_id.



8
9
10
# File 'lib/mtproto/tl/objects/check_password.rb', line 8

def srp_id
  @srp_id
end

Instance Method Details

#serializeObject



16
17
18
19
20
21
22
# File 'lib/mtproto/tl/objects/check_password.rb', line 16

def serialize
  u32_b(Constructors::AUTH_CHECK_PASSWORD) +
    u32_b(Constructors::INPUT_CHECK_PASSWORD_SRP) +
    u64_b(@srp_id) +
    serialize_tl_bytes(@a) +
    serialize_tl_bytes(@m1)
end