package main
import (
"encryp"
"crypto/sha256"
"fmt"
)
type sgTure struct{
info []byte
sginfo []byte
randKey string
}
func main() {
info:="hello,Bob,don't still owe me 500 yuan money"
data := []byte(info)
sat:=sha256.Sum256(data)
sginfo:=encryp.RsaEncrypt(sat)
randkey=getRandStr()
info:=encryp.EncryptDES(data,randkey)
sgture:=sgTure{
info,
sginfo:sginfo,
randKey:randkey
}
sendToBob(sgture)
}
package main
import (
"encryp"
"crypto/sha256"
"fmt"
)
type sgTure struct{
info []byte
sginfo []byte
randKey string
}
func main() {
info:="hello,Bob,don't still owe me 500 yuan money"
data := []byte(info)
sat:=sha256.Sum256(data)
sginfo:=encryp.RsaEncrypt(sat)
randkey=getRandStr()
info:=encryp.EncryptDES(data,randkey)
sgture:=sgTure{
info,
sginfo:sginfo,
randKey:randkey
}
sendToBob(sgture)
}