func NewEphemeralKey(config *EphemeralKeyConfig) (*EphemeralKey, error) {
	eph := &EphemeralKey{PrivateKey: config.PrivateKey}

	if eph.PrivateKey == nil {
		pvKey, err := crypto.GenerateKey()
		eph.PrivateKey = pvKey
		if err != nil {
			return nil, err
		}
	}

	return eph, nil
}
// NewEphemeralKey generates a EphemeralKey which is basically a ecdsa key
NewEphemeralKey generates a EphemeralKey which is basically a ecdsa key
// NewEphemeralKey generates a EphemeralKey which is basically a ecdsa key
func NewEphemeralKey(config *EphemeralKeyConfig) (*EphemeralKey, error) {
	eph := &EphemeralKey{PrivateKey: config.PrivateKey}
	if eph.PrivateKey == nil {
		pvKey, err := crypto.GenerateKey()
		eph.PrivateKey = pvKey
		if err != nil {
			return nil, err
		}
	}
	return eph, nil
}
func NewEphemeralKey ( config * EphemeralKeyConfig ) ( * EphemeralKey , error ) { eph := & EphemeralKey { PrivateKey : config . PrivateKey } if eph . PrivateKey == nil { pvKey , err := crypto . GenerateKey ( ) eph . PrivateKey = pvKey if err != nil { return nil , err } } return eph , nil }
NewEphemeralKey generates a EphemeralKey which is basically a ecdsa key
NewEphemeralKey generates a EphemeralKey which is basically a ecdsa key