start preparing for gutting of libsodium dependancy
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
REPO=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
||||
|
||||
all: clean build
|
||||
|
||||
build: srndv2
|
||||
all: srndv2
|
||||
|
||||
srndv2:
|
||||
GOPATH=$(REPO) go build -v -tags libsodium
|
||||
|
||||
pure:
|
||||
GOPATH=$(REPO) go build -v
|
||||
|
||||
clean:
|
||||
|
29
contrib/backends/srndv2/src/srnd/cryptography.go
Normal file
29
contrib/backends/srndv2/src/srnd/cryptography.go
Normal file
@@ -0,0 +1,29 @@
|
||||
// +build !libsodium
|
||||
|
||||
package srnd
|
||||
|
||||
import (
|
||||
"golang.org/x/crypto/curve25519"
|
||||
)
|
||||
|
||||
func naclCryptoVerifyFucky(h, sig, pk []byte) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func naclCryptoSignFucky(hash, sk []byte) []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
func naclCryptoVerifyDetached(hash, sig, pk []byte) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func naclCryptoSignDetached(hash, sk []byte) []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
func naclSeedToKeyPair(seed []byte) (pk, sk []byte) {
|
||||
return
|
||||
}
|
||||
|
||||
var naclScalarBaseMult = curve25519.ScalarBaseMult
|
@@ -1,3 +1,5 @@
|
||||
// +build libsodium
|
||||
|
||||
package srnd
|
||||
|
||||
import (
|
||||
|
Reference in New Issue
Block a user