mirror of
https://github.com/status-im/status-go.git
synced 2025-01-12 07:35:02 +00:00
14 lines
326 B
Go
14 lines
326 B
Go
|
package bep44
|
||
|
|
||
|
import (
|
||
|
"crypto/ed25519"
|
||
|
)
|
||
|
|
||
|
func Sign(k ed25519.PrivateKey, salt []byte, seq int64, bv []byte) []byte {
|
||
|
return ed25519.Sign(k, bufferToSign(salt, bv, seq))
|
||
|
}
|
||
|
|
||
|
func Verify(k ed25519.PublicKey, salt []byte, seq int64, bv []byte, sig []byte) bool {
|
||
|
return ed25519.Verify(k, bufferToSign(salt, bv, seq), sig)
|
||
|
}
|