make raw private key public
This commit is contained in:
parent
2fa7332719
commit
4157d8e07a
2
ecdsa.go
2
ecdsa.go
|
@ -63,7 +63,7 @@ func (pr EcdsaPrivateKey) Sign(message []byte, hash crypto.Hash) ([]byte, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the private key
|
// get the private key
|
||||||
func (pr EcdsaPrivateKey) privateKey() crypto.PrivateKey {
|
func (pr EcdsaPrivateKey) PrivateKey() crypto.PrivateKey {
|
||||||
return pr.private_key
|
return pr.private_key
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
rsa.go
2
rsa.go
|
@ -46,7 +46,7 @@ func (pr RsaPrivateKey) Sign(message []byte, hash crypto.Hash) ([]byte, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the private key
|
// get the private key
|
||||||
func (pr RsaPrivateKey) privateKey() crypto.PrivateKey {
|
func (pr RsaPrivateKey) PrivateKey() crypto.PrivateKey {
|
||||||
return pr.private_key
|
return pr.private_key
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
types.go
2
types.go
|
@ -20,7 +20,7 @@ type (
|
||||||
Sign(message []byte, hash crypto.Hash) ([]byte, error)
|
Sign(message []byte, hash crypto.Hash) ([]byte, error)
|
||||||
|
|
||||||
// return the private key structure
|
// return the private key structure
|
||||||
privateKey() crypto.PrivateKey
|
PrivateKey() crypto.PrivateKey
|
||||||
}
|
}
|
||||||
|
|
||||||
// interface for any public key
|
// interface for any public key
|
||||||
|
|
Loading…
Reference in New Issue