hwsecurity / de.cotech.hw.util / Arrays /

Arrays

class Arrays

General array utilities.

Types

Name Summary
Iterator

open class Iterator<T> : Iterator<T>

Iterator backed by a specific array.

Functions

Name Summary
append open fun append(a: Array<Byte>, b: Byte): Array<Byte>
open fun append(a: Array<Int>, b: Int): Array<Int>
open fun append(a: Array<String>, b: String): Array<String>
open fun append(a: Array<Short>, b: Short): Array<Short>
areAllZeroes open fun areAllZeroes(buf: Array<Byte>, off: Int, len: Int): Boolean
areEqual open fun areEqual(a: Array<Boolean>, b: Array<Boolean>): Boolean
open fun areEqual(a: Array<Byte>, b: Array<Byte>): Boolean
open fun areEqual(a: Array<Char>, b: Array<Char>): Boolean
open fun areEqual(a: Array<Int>, b: Array<Int>): Boolean
open fun areEqual(a: Array<Any>, b: Array<Any>): Boolean
open fun areEqual(a: Array<Long>, b: Array<Long>): Boolean
open fun areEqual(a: Array<Short>, b: Array<Short>): Boolean
clear

open fun clear(array: Array<Byte>)

Fill input array by zeros

clone open fun clone(data: Array<Byte>): Array<Byte>
open fun clone(data: Array<Array<Byte»): Array<Array<Byte»
open fun clone(data: Array<Array<Array<Byte»>): Array<Array<Array<Byte»>
open fun clone(data: Array<Char>): Array<Char>
open fun clone(data: Array<Int>): Array<Int>
open fun clone(data: Array<BigInteger>): Array<BigInteger>
open fun clone(data: Array<Long>): Array<Long>
open fun clone(data: Array<Short>): Array<Short>
open fun clone(data: Array<Byte>, existing: Array<Byte>): Array<Byte>
open fun clone(data: Array<Long>, existing: Array<Long>): Array<Long>
compareUnsigned open fun compareUnsigned(a: Array<Byte>, b: Array<Byte>): Int
concatenate open fun concatenate(arrays: Array<Array<Byte»): Array<Byte>
open fun concatenate(a: Array<Byte>, b: Array<Byte>): Array<Byte>
open fun concatenate(a: Array<Int>, b: Array<Int>): Array<Int>
open fun concatenate(a: Array<Byte>, b: Array<Byte>, c: Array<Byte>): Array<Byte>
open fun concatenate(a: Array<Byte>, b: Array<Byte>, c: Array<Byte>, d: Array<Byte>): Array<Byte>
constantTimeAreEqual

open fun constantTimeAreEqual(expected: Array<Byte>, supplied: Array<Byte>): Boolean

A constant time equals comparison - does not terminate early iftest will fail.

contains open fun contains(a: Array<Int>, n: Int): Boolean
open fun contains(a: Array<Short>, n: Short): Boolean
copyOf open fun copyOf(data: Array<Byte>, newLength: Int): Array<Byte>
open fun copyOf(data: Array<Char>, newLength: Int): Array<Char>
open fun copyOf(data: Array<Int>, newLength: Int): Array<Int>
open fun copyOf(data: Array<BigInteger>, newLength: Int): Array<BigInteger>
open fun copyOf(data: Array<Long>, newLength: Int): Array<Long>
copyOfRange

open fun copyOfRange(data: Array<Byte>, from: Int, to: Int): Array<Byte>

Make a copy of a range of bytes from the passed in data array.

open fun copyOfRange(data: Array<Int>, from: Int, to: Int): Array<Int>
open fun copyOfRange(data: Array<BigInteger>, from: Int, to: Int): Array<BigInteger>
open fun copyOfRange(data: Array<Long>, from: Int, to: Int): Array<Long>

fill open fun fill(array: Array<Byte>, value: Byte)
open fun fill(array: Array<Char>, value: Char)
open fun fill(array: Array<Int>, value: Int)
open fun fill(array: Array<Long>, value: Long)
open fun fill(array: Array<Short>, value: Short)
open fun fill(array: Array<Byte>, out: Int, value: Byte)
open fun fill(array: Array<Int>, out: Int, value: Int)
open fun fill(array: Array<Long>, out: Int, value: Long)
open fun fill(array: Array<Short>, out: Int, value: Short)
open fun fill(array: Array<Byte>, start: Int, finish: Int, value: Byte)
hashCode open fun hashCode(data: Array<Byte>): Int
open fun hashCode(data: Array<Char>): Int
open fun hashCode(data: Array<Int>): Int
open fun hashCode(ints: Array<Array<Int»): Int
open fun hashCode(data: Array<Any>): Int
open fun hashCode(data: Array<Long>): Int
open fun hashCode(data: Array<Short>): Int
open fun hashCode(shorts: Array<Array<Short»): Int
open fun hashCode(shorts: Array<Array<Array<Short»>): Int
open fun hashCode(data: Array<Byte>, off: Int, len: Int): Int
open fun hashCode(data: Array<Int>, off: Int, len: Int): Int
open fun hashCode(data: Array<Long>, off: Int, len: Int): Int
prepend open fun prepend(a: Array<Byte>, b: Byte): Array<Byte>
open fun prepend(a: Array<Int>, b: Int): Array<Int>
open fun prepend(a: Array<Short>, b: Short): Array<Short>
reverse open fun reverse(a: Array<Byte>): Array<Byte>
open fun reverse(a: Array<Int>): Array<Int>