implement padding, support UByteArray
This commit is contained in:
@@ -7,6 +7,12 @@ enum class ByteOrder {
|
||||
): ByteArray {
|
||||
return bytes
|
||||
}
|
||||
|
||||
override fun normalize(
|
||||
bytes: UByteArray,
|
||||
): UByteArray {
|
||||
return bytes
|
||||
}
|
||||
},
|
||||
LITTLE_ENDIAN {
|
||||
override fun normalize(
|
||||
@@ -14,9 +20,19 @@ enum class ByteOrder {
|
||||
): ByteArray {
|
||||
return bytes.reversedArray()
|
||||
}
|
||||
|
||||
override fun normalize(
|
||||
bytes: UByteArray,
|
||||
): UByteArray {
|
||||
return bytes.reversedArray()
|
||||
}
|
||||
};
|
||||
|
||||
internal abstract fun normalize(
|
||||
bytes: ByteArray,
|
||||
): ByteArray
|
||||
|
||||
internal abstract fun normalize(
|
||||
bytes: UByteArray,
|
||||
): UByteArray
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user