How to detect in Android whether UID from NFC tag is random?

前端 未结 2 1284
臣服心动
臣服心动 2020-12-20 05:33

I am working on an Android project which relies on the unique UID of a discovered NFC tag to process the tag. I extract this UID using the following code:

by         


        
2条回答
  •  情歌与酒
    2020-12-20 05:59

    This RFC: http://tools.ietf.org/html/rfc4122#section-4.1.3 defines the format of a UID; it includes a field indicating what type of UID it is:

     Msb0  Msb1  Msb2  Msb3   Version  Description
    
        0     0     0     1        1     The time-based version
                                         specified in this document.
    
        0     0     1     0        2     DCE Security version, with
                                         embedded POSIX UIDs.
    
        0     0     1     1        3     The name-based version
                                         specified in this document
                                         that uses MD5 hashing.
    
        0     1     0     0        4     The randomly or pseudo-
                                         randomly generated version
                                         specified in this document.
    
        0     1     0     1        5     The name-based version
                                         specified in this document
                                         that uses SHA-1 hashing.
    

提交回复
热议问题