Added Mac.toLong(string)
parent
27a90021a7
commit
b7d62e4242
|
@ -300,6 +300,10 @@ object Mac {
|
|||
return BigInteger(s, 16).toByteArray()
|
||||
}
|
||||
|
||||
fun toLong(mac: String): Long {
|
||||
return toLong(mac, MacDelimiter.COLON)
|
||||
}
|
||||
|
||||
fun toLong(mac: ByteArray): Long {
|
||||
return ((mac[5].toLong() and 0xff)
|
||||
+ (mac[4].toLong() and 0xff shl 8)
|
||||
|
|
Loading…
Reference in New Issue