Package com.android.identity
Class MobileSecurityObjectParser
- java.lang.Object
-
- com.android.identity.MobileSecurityObjectParser
-
public class MobileSecurityObjectParser extends java.lang.ObjectHelper class for parsing the bytes ofMobileSecurityObjectCBOR as specified in ISO/IEC 18013-5 section 9.1.2 Issuer data authentication.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMobileSecurityObjectParser.MobileSecurityObjectAn object used to represent data parsed fromMobileSecurityObjectCBOR as specified in ISO/IEC 18013-5 section 9.1.2 Issuer data authentication
-
Constructor Summary
Constructors Constructor Description MobileSecurityObjectParser()Constructs aMobileSecurityObjectParser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MobileSecurityObjectParser.MobileSecurityObjectparse()Parses the mobile security object.MobileSecurityObjectParsersetMobileSecurityObject(byte[] encodedMobileSecurityObject)Sets the bytes of theMobileSecurityObjectCBOR.
-
-
-
Constructor Detail
-
MobileSecurityObjectParser
public MobileSecurityObjectParser()
Constructs aMobileSecurityObjectParser.
-
-
Method Detail
-
setMobileSecurityObject
@NonNull public MobileSecurityObjectParser setMobileSecurityObject(@NonNull byte[] encodedMobileSecurityObject)
Sets the bytes of theMobileSecurityObjectCBOR.- Parameters:
encodedMobileSecurityObject- The bytes ofMobileSecurityObject.- Returns:
- The
MobileSecurityObjectParser.
-
parse
@NonNull public MobileSecurityObjectParser.MobileSecurityObject parse()
Parses the mobile security object.It's mandatory to call
setMobileSecurityObject(byte[])before this call.- Returns:
- a
MobileSecurityObjectParser.MobileSecurityObjectwith the parsed data. - Throws:
java.lang.IllegalArgumentException- if the given data isn't valid CBOR or not conforming to the CDDL for its type.java.lang.IllegalStateException- if required data hasn't been set using the setter methods on this class.
-
-