mirror of
https://github.com/corda/corda.git
synced 2024-12-19 04:57:58 +00:00
Minor: make SecureHash c'tor private so it's not possible to instantiate directly.
This commit is contained in:
parent
31964f8695
commit
ae6309a113
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user