aboutsummaryrefslogtreecommitdiff
path: root/mocks/crypto.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2021-06-06 15:59:35 +0200
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2021-06-06 15:59:35 +0200
commit47bacfd5c5d22470340e0823c4ad37b45914b68e (patch)
tree0984b55ced1e537e8d1d681c77157f1a47e47cdc /mocks/crypto.go
parent0285454c34b0b3003bc8ede3e304b843ad949be8 (diff)
started using the refactored packages in siglog server
Diffstat (limited to 'mocks/crypto.go')
-rw-r--r--mocks/crypto.go23
1 files changed, 0 insertions, 23 deletions
diff --git a/mocks/crypto.go b/mocks/crypto.go
deleted file mode 100644
index 87c883a..0000000
--- a/mocks/crypto.go
+++ /dev/null
@@ -1,23 +0,0 @@
-package mocks
-
-import (
- "crypto"
- "crypto/ed25519"
- "io"
-)
-
-// TestSign implements the signer interface. It can be used to mock an Ed25519
-// signer that always return the same public key, signature, and error.
-type TestSigner struct {
- PublicKey *[ed25519.PublicKeySize]byte
- Signature *[ed25519.SignatureSize]byte
- Error error
-}
-
-func (ts *TestSigner) Public() crypto.PublicKey {
- return ed25519.PublicKey(ts.PublicKey[:])
-}
-
-func (ts *TestSigner) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error) {
- return ts.Signature[:], ts.Error
-}