MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / SetLocalKeyPair

Function SetLocalKeyPair

crypto/kms/localkeystore.go:79–88  ·  view source on GitHub ↗

SetLocalKeyPair sets private and public key, this is a one time thing.

(private *asymmetric.PrivateKey, public *asymmetric.PublicKey)

Source from the content-addressed store, hash-verified

77
78// SetLocalKeyPair sets private and public key, this is a one time thing.
79func SetLocalKeyPair(private *asymmetric.PrivateKey, public *asymmetric.PublicKey) {
80 localKey.Lock()
81 defer localKey.Unlock()
82 if localKey.isSet {
83 return
84 }
85 localKey.isSet = true
86 localKey.private = private
87 localKey.public = public
88}
89
90// SetLocalNodeIDNonce sets private and public key, this is a one time thing.
91func SetLocalNodeIDNonce(rawNodeID []byte, nonce *mine.Uint256) {

Callers 5

setupFunction · 0.92
setupFunction · 0.92
setupFunction · 0.92
TestLocalKeyStoreFunction · 0.85
InitLocalKeyPairFunction · 0.85

Calls

no outgoing calls

Tested by 4

setupFunction · 0.74
setupFunction · 0.74
setupFunction · 0.74
TestLocalKeyStoreFunction · 0.68