func (key PrivKeyEd25519) Sign(msg []byte) Signature { pubKey := key.PubKey().(PubKeyEd25519) keyBytes := new([64]byte) copy(keyBytes[:32], key[:]) copy(keyBytes[32:], pubKey[:]) signatureBytes := ed25519.Sign(keyBytes, msg) return SignatureEd25519(signatureBytes[:]) }
func (key PrivKeyEd25519) Sign(msg []byte) Signature { privKeyBytes := [64]byte(key) signatureBytes := ed25519.Sign(&privKeyBytes, msg) return SignatureEd25519(*signatureBytes) }