fun generateUserIdData()

in PoC/android/app/src/main/java/com/epam/crowdresitance/bluetooth/BtConfig.kt [41:60]


        fun generateUserIdData(context: Context) {
            val devIDShort = ("35" +
                    Build.BOARD.length % 10
                    + Build.BRAND.length % 10
                    + Build.CPU_ABI.length % 10
                    + Build.DEVICE.length % 10
                    + Build.MANUFACTURER.length % 10
                    + Build.MODEL.length % 10
                    + Build.PRODUCT.length % 10)

            val androidId =
                Settings.Secure.getString(
                    context.contentResolver,
                    Settings.Secure.ANDROID_ID)

            val uuid = UUID(devIDShort.hashCode().toLong(), androidId.hashCode().toLong())
            userId =
                uuid.leastSignificantBits.xor(uuid.mostSignificantBits).absoluteValue.toString()
                    .toByteArray()
        }