Trait constants
05nelsonm opened this issue · comments
Add constants to each algorithm with its traits, much like primitives, such as Byte.SIZE_BITS
or Int.SIZE_BYTES
e.g.
public class MD5: Digest {
// ...
public companion object {
public const val NAME: String = "MD5"
public const val BLOCK_SIZE: Int = 64
public const val LENGTH_BYTES: Int = 16
public const val LENGTH_BITS: Int = LENGTH_BYTES * Byte.SIZE_BITS
}
}
Yup, not necessary and would increase API surface area. 👎