Minor: make SecureHash c'tor private so it's not possible to instantiate directly.

This commit is contained in:
Mike Hearn 2016-02-09 20:19:10 +01:00
parent 31964f8695
commit ae6309a113

View File

@ -16,7 +16,7 @@ import java.security.*
import java.security.interfaces.ECPublicKey
// "sealed" here means there can't be any subclasses other than the ones defined here.
sealed class SecureHash(bits: ByteArray) : OpaqueBytes(bits) {
sealed class SecureHash private constructor(bits: ByteArray) : OpaqueBytes(bits) {
class SHA256(bits: ByteArray) : SecureHash(bits) {
init { require(bits.size == 32) }
override val signatureAlgorithmName: String get() = "SHA256withECDSA"