implement hash size property
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
package com.infendro.hash
|
||||
|
||||
sealed class HashFunction {
|
||||
abstract val bytes: Int
|
||||
val bits: Int
|
||||
get() = bytes * 8
|
||||
|
||||
abstract fun hash(
|
||||
value: ByteArray,
|
||||
): ByteArray
|
||||
|
||||
Reference in New Issue
Block a user