cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Absolute Identifier format or base?

gmarkow
Super Contributor

Hi,

Can anyone tell me what the format is of the absolute identifier (IDABS)?  Is it a generated string or a different base?  I tried quite a range of base conversions from 64 - 128.

Thanks!

Greg

 

I found this:

An absolute identifier is a string of characters associated with each object in the repository.
 
An absolute identifier provides a unique way to identify an object in the repository so that even if the object is renamed all the links to it are retained.
 
It is available though two properties:
Absolute identifier (also called idabs or _idabs)
 Size: 12 char
Absolute identifier base 16 (also called hexaidabs or _hexaidabs)
 Size: 16 char 16 base: each char is on of the following char.: 0123456789abcdef

4 Replies

gmarkow
Super Contributor

Thank you!  I had just begun exploring the Toolkit class.

Thanks,

Greg

Hello

 

This algoryhm is not public

 

However, with the object MegaToolKit (available from MetaApplication or MegaCurrentEnvironment) useful functions are available

  • GenerateID  to generate a valid ID
  • GetString64FromId to convert an ID to a string of ID base 64
  • GetStringFromId to convert an ID to a string of ID base 16

 

Example (VB script)

 

'get toolkit
Set oToolKit = GetRoot.CurrentEnvironment.Toolkit

'get object and ID
Set oObj = GetRoot.GetObjectFromId("~8rG5Ll188rS0[MEGA]")
sID = oObj.GetId
sID64 = oObj.GetProp("_idabs")
sID16 = oObj.GetProp("_hexaidabs")

'convert
sID16to64 = oToolkit.GetString64FromId(sID)
ID64to16 = oToolkit.GetStringFromId(sID)

'generate valid ID
sValidId = oToolkit.GenerateID 
sValidId64 = oToolkit.GetString64FromId(sValidId)
sValidId16 = oToolkit.GetStringFromId(sValidId)

Print "ID (base 64): " & sID64 
Print "ID (base 16): " & sID16 
Print "Get ID (base 64) from ID (base 16) :" & sID16to64
Print "Get ID (base 16) from ID (base 64) :" & ID64to16 
Print "Valid ID (Base 64) : " & sValidId64
Print "Valid ID (Base 16) : " & sValidId16 

 

 

Jerome

gmarkow
Super Contributor

Thank you.

We are not planning to generate our own.  We are trying to understand the conversion from the HexIDABS to the character one.

Can you share the algorithm?  

Thanks!

Greg

jhorber
MEGA
MEGA

Hello gmarkow

 

Absolute identifier are generated by the MEGA/HOPEX platform only using a specific algorythm.
Do not try to generate it yourself: you could create a value considered as invalid.

 

Additional informations regarding absolute identifier

  • Size: 12 char long
  • Case sensitive
  • Base 64
  • Characters authorized: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz()
Jerome