Home
last modified time | relevance | path

Searched refs:asn1Value (Results 1 – 2 of 2) sorted by relevance

/cts/tests/security/src/android/keystore/cts/
DAsn1Utils.java43 public static int getIntegerFromAsn1(ASN1Encodable asn1Value) in getIntegerFromAsn1() argument
45 if (asn1Value instanceof ASN1Integer) { in getIntegerFromAsn1()
46 return bigIntegerToInt(((ASN1Integer) asn1Value).getValue()); in getIntegerFromAsn1()
47 } else if (asn1Value instanceof ASN1Enumerated) { in getIntegerFromAsn1()
48 return bigIntegerToInt(((ASN1Enumerated) asn1Value).getValue()); in getIntegerFromAsn1()
51 "Integer value expected, " + asn1Value.getClass().getName() + " found."); in getIntegerFromAsn1()
55 public static Long getLongFromAsn1(ASN1Encodable asn1Value) throws CertificateParsingException { in getLongFromAsn1() argument
56 if (asn1Value instanceof ASN1Integer) { in getLongFromAsn1()
57 return bigIntegerToLong(((ASN1Integer) asn1Value).getValue()); in getLongFromAsn1()
60 "Integer value expected, " + asn1Value.getClass().getName() + " found."); in getLongFromAsn1()
/cts/tests/tests/identity/src/android/security/identity/cts/
DParsedAttestationRecord.java141 private static boolean getBooleanFromAsn1(ASN1Encodable asn1Value) { in getBooleanFromAsn1() argument
142 if (asn1Value instanceof ASN1Boolean) { in getBooleanFromAsn1()
143 return ((ASN1Boolean) asn1Value).isTrue(); in getBooleanFromAsn1()
146 "Boolean value expected; found " + asn1Value.getClass().getName() + " instead."); in getBooleanFromAsn1()
150 private static int getIntegerFromAsn1(ASN1Encodable asn1Value) { in getIntegerFromAsn1() argument
151 if (asn1Value instanceof ASN1Integer) { in getIntegerFromAsn1()
152 return ((ASN1Integer) asn1Value).getValue().intValue(); in getIntegerFromAsn1()
153 } else if (asn1Value instanceof ASN1Enumerated) { in getIntegerFromAsn1()
154 return ((ASN1Enumerated) asn1Value).getValue().intValue(); in getIntegerFromAsn1()
157 "Integer value expected; found " + asn1Value.getClass().getName() + " instead."); in getIntegerFromAsn1()