Method: Rmega::Nodes::Node#attributes
- Defined in:
- lib/rmega/nodes/node.rb
#attributes ⇒ Object
118 119 120 121 122 123 124 125 126 |
# File 'lib/rmega/nodes/node.rb', line 118 def attributes encrypted = data['a'] || data['at'] return if !encrypted or encrypted.empty? node_key = NodeKey.load(decrypted_file_key) encrypted = Utils.base64urldecode(encrypted) encrypted.strip! if encrypted.size % 16 != 0 # Fix possible errors json = aes_cbc_decrypt(node_key.aes_key, encrypted) JSON.parse json.gsub(/^MEGA/, '').rstrip end |