    001    package org.bouncycastle.asn1;
    002
    003    public class DERObjectIdentifier extends ASN1Primitive
    004    {
    005        String field_71611_a;
    006        private static ASN1ObjectIdentifier[][] field_71610_b = new ASN1ObjectIdentifier[255][];
    007
    008        public DERObjectIdentifier(String par1Str)
    009        {
    010            if (!func_71608_a(par1Str))
    011            {
    012                throw new IllegalArgumentException("string " + par1Str + " not an OID");
    013            }
    014            else
    015            {
    016                this.field_71611_a = par1Str;
    017            }
    018        }
    019
    020        public String func_71609_b()
    021        {
    022            return this.field_71611_a;
    023        }
    024
    025        public int hashCode()
    026        {
    027            return this.field_71611_a.hashCode();
    028        }
    029
    030        boolean asn1Equals(ASN1Primitive par1ASN1Primitive)
    031        {
    032            return !(par1ASN1Primitive instanceof DERObjectIdentifier) ? false : this.field_71611_a.equals(((DERObjectIdentifier)par1ASN1Primitive).field_71611_a);
    033        }
    034
    035        public String toString()
    036        {
    037            return this.func_71609_b();
    038        }
    039
    040        private static boolean func_71608_a(String par0Str)
    041        {
    042            if (par0Str.length() >= 3 && par0Str.charAt(1) == 46)
    043            {
    044                char var1 = par0Str.charAt(0);
    045
    046                if (var1 >= 48 && var1 <= 50)
    047                {
    048                    boolean var2 = false;
    049
    050                    for (int var3 = par0Str.length() - 1; var3 >= 2; --var3)
    051                    {
    052                        char var4 = par0Str.charAt(var3);
    053
    054                        if (48 <= var4 && var4 <= 57)
    055                        {
    056                            var2 = true;
    057                        }
    058                        else
    059                        {
    060                            if (var4 != 46)
    061                            {
    062                                return false;
    063                            }
    064
    065                            if (!var2)
    066                            {
    067                                return false;
    068                            }
    069
    070                            var2 = false;
    071                        }
    072                    }
    073
    074                    return var2;
    075                }
    076                else
    077                {
    078                    return false;
    079                }
    080            }
    081            else
    082            {
    083                return false;
    084            }
    085        }
    086    }