Cleaning up and implementing api

This commit is contained in:
Ugljesa Jovanovic authored and Ugljesa Jovanovic committed 2020-06-07 00:02:53 +02:00
1 parent 4357124b48
commit e61ffdf978
24 files changed
+352 -783

No files matched your search

@@ -9,11 +9,17 @@ import com.ionspin.kotlin.crypto.hash.UpdatableHash
* on 24-May-2020
*/
interface Blake2b : UpdatableHash
interface Blake2bStatelessInterface : StatelessHash {
override val MAX_HASH_BYTES: Int
get() = 64
object Blake2bProperties {
const val MAX_HASH_BYTES = 64
}
interface Blake2b : UpdatableHash {
override val MAX_HASH_BYTES: Int
get() = Blake2bProperties.MAX_HASH_BYTES
}
interface Blake2bStateless : StatelessHash {
override val MAX_HASH_BYTES: Int
get() = Blake2bProperties.MAX_HASH_BYTES
}
@@ -8,5 +8,15 @@ import com.ionspin.kotlin.crypto.hash.UpdatableHash
* ugljesa.jovanovic@ionspin.com
* on 24-May-2020
*/
interface Sha256 : UpdatableHash
interface StatelessSha256 : StatelessHash
object Sha256Properties {
const val MAX_HASH_BYTES = 32
}
interface Sha256 : UpdatableHash {
override val MAX_HASH_BYTES: Int
get() = Sha256Properties.MAX_HASH_BYTES
}
interface StatelessSha256 : StatelessHash {
override val MAX_HASH_BYTES: Int
get() = Sha256Properties.MAX_HASH_BYTES
}
@@ -8,5 +8,14 @@ import com.ionspin.kotlin.crypto.hash.UpdatableHash
* ugljesa.jovanovic@ionspin.com
* on 24-May-2020
*/
interface Sha512 : UpdatableHash
interface StatelessSha512 : StatelessHash
object Sha512Properties {
const val MAX_HASH_BYTES = 64
}
interface Sha512 : UpdatableHash {
override val MAX_HASH_BYTES: Int
get() = Sha256Properties.MAX_HASH_BYTES
}
interface StatelessSha512 : StatelessHash {
override val MAX_HASH_BYTES: Int
get() = Sha256Properties.MAX_HASH_BYTES
}