static public ToInt32 ( Mono.Security.ASN1 asn1 ) : int | ||
asn1 | Mono.Security.ASN1 | |
return | int |
static public int ToInt32 (ASN1 asn1)
{
if (asn1 == null)
throw new ArgumentNullException ("asn1");
if (asn1.Tag != 0x02)
throw new FormatException ("Only integer can be converted");
int x = 0;
for (int i=0; i < asn1.Value.Length; i++)
x = (x << 8) + asn1.Value [i];
return x;
}