This class implement an OID (Object Identifier). An OID is encoded as a list of bytes representing integers. An OID has a numeric representation where number are separated with dots : SPNEGO Oid=1.3.6.1.5.5.2 Translating from a byte list to a dot separated list of number follows the rules : - the first number is in [0..2] - the second number is in [0..39] if the first number is 0 or 1 - the first byte has a value equal to : number 1 * 40 + number two - the upper bit of a byte is set if the next byte is a part of the number For instance, the SPNEGO Oid (1.3.6.1.5.5.2) will be encoded : 1.3 -> 0x2B (1*40 + 3=43 = 0x2B) .6 -> 0x06 .1 -> 0x01 .5 -> 0x05 .5 -> 0x05 .2 -> 0x02 The Kerberos V5 Oid (1.2.840.48018.1.2.2) will be encoded : 1.2 -> 0x2A (1*40 + 2=42 = 0x2A) 840 -> 0x86 0x48 (840 = 6 * 128 + 72=(0x06 | 0x80) 0x48=0x86 0x48 48018 -> 0x82 0xF7 0x12 (2 * 128 * 128 + 119 * 128 + 18=(0x02 | 0x80) (0x77 | 0x80) 0x12 .1 -> 0x01 .2 -> 0x02 .2 -> 0x02
@author Apache Directory Project
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.