mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-08 17:20:11 +08:00
Add check for DeviceInfo.imsiMd5.size on init. #979
This commit is contained in:
parent
13faff5471
commit
fd3b32482e
@ -43,6 +43,10 @@ public class DeviceInfo(
|
|||||||
public val androidId: ByteArray get() = display
|
public val androidId: ByteArray get() = display
|
||||||
public val ipAddress: ByteArray get() = byteArrayOf(192.toByte(), 168.toByte(), 1, 123)
|
public val ipAddress: ByteArray get() = byteArrayOf(192.toByte(), 168.toByte(), 1, 123)
|
||||||
|
|
||||||
|
init {
|
||||||
|
require(imsiMd5.size == 16) { "Bad `imsiMd5.size`. Required 16, given ${imsiMd5.size}." }
|
||||||
|
}
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
@MiraiInternalApi
|
@MiraiInternalApi
|
||||||
public val guid: ByteArray = generateGuid(androidId, macAddress)
|
public val guid: ByteArray = generateGuid(androidId, macAddress)
|
||||||
|
Loading…
Reference in New Issue
Block a user