fixed typo
This commit is contained in:
parent
1629dd276c
commit
b62f23695e
|
@ -1,3 +1,19 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2023 dorkbox, llc
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MIT License
|
* MIT License
|
||||||
*
|
*
|
||||||
|
@ -79,7 +95,7 @@ object Hex {
|
||||||
* @throws IllegalArgumentException if the value is not a hexadecimal string.
|
* @throws IllegalArgumentException if the value is not a hexadecimal string.
|
||||||
*/
|
*/
|
||||||
fun decode(value: String): ByteArray {
|
fun decode(value: String): ByteArray {
|
||||||
// An hex string must always have length multiple of 2
|
// A hex string must always have length multiple of 2
|
||||||
if (value.length % 2 != 0) {
|
if (value.length % 2 != 0) {
|
||||||
throw IllegalArgumentException("hex-string must have an even number of digits (nibbles)")
|
throw IllegalArgumentException("hex-string must have an even number of digits (nibbles)")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue