Class: LastPass::Blob

Inherits:
Object
  • Object
show all
Defined in:
lib/lastpass/blob.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bytes, key_iteration_count, encrypted_private_key) ⇒ Blob

Returns a new instance of Blob.



10
11
12
13
14
# File 'lib/lastpass/blob.rb', line 10

def initialize bytes, key_iteration_count, encrypted_private_key
    @bytes = bytes
    @key_iteration_count = key_iteration_count
    @encrypted_private_key = encrypted_private_key
end

Instance Attribute Details

#bytesObject (readonly)

Returns the value of attribute bytes.



6
7
8
# File 'lib/lastpass/blob.rb', line 6

def bytes
  @bytes
end

#encrypted_private_keyObject (readonly)

Returns the value of attribute encrypted_private_key.



6
7
8
# File 'lib/lastpass/blob.rb', line 6

def encrypted_private_key
  @encrypted_private_key
end

#key_iteration_countObject (readonly)

Returns the value of attribute key_iteration_count.



6
7
8
# File 'lib/lastpass/blob.rb', line 6

def key_iteration_count
  @key_iteration_count
end

Instance Method Details

#encryption_key(username, password) ⇒ Object



16
17
18
# File 'lib/lastpass/blob.rb', line 16

def encryption_key username, password
    Fetcher.make_key username, password, key_iteration_count
end