- 博客(3)
- 收藏
- 关注
原创 Golang1.7.3实现启动单一实例代码片段
var ( NameMutex = "Shamem" kernel = syscall.NewLazyDLL("kernel32.dll"))const ( IPC_RMID = 0 IPC_CREAT = 00001000 IPC_EXCL = 00002000 IPC_NOWAIT = 00004000)func Lock_wi
2016-11-25 18:12:39 1024
原创 Golang1.7.3使用标准库的AES加密解密不实用扩展协议
package mainimport ( "crypto/aes" "crypto/cipher" "fmt")type tobytes struct { cip cipher.Block pdgtext []byte}func main() { cip, _ := aes.NewCipher([]byte("123456789123456
2016-11-22 10:44:12 1576
原创 Golang1.7.3使用x509标准库创建自签名证书和签发名其他证书
主代码:package rsaimport ( "crypto/rand" "crypto/rsa" "crypto/x509" "crypto/x509/pkix" "encoding/pem" "io/ioutil" "math/big" rd "math/rand" "os" "time")func init(
2016-11-02 17:56:22 5709 3
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人