3 Commits

Author SHA1 Message Date
7c636ded82 fix(更新模块): 更改模块名 2020-09-23 19:54:46 +08:00
d1de686678 chore(自动部署): 添加ci文件 2020-08-11 18:08:38 +08:00
420f41e6e8 docs(说明文档): 添加手动安装说明 2020-07-31 16:36:59 +08:00
6 changed files with 21 additions and 15 deletions

10
.drone.yml Normal file
View File

@ -0,0 +1,10 @@
kind: pipeline
type: docker
name: default
steps:
- name: build
pull: if-not-exists
image: golang:alpine
commands:
- go build -mod=vendor ihash.go

View File

@ -8,6 +8,11 @@ git clone https://github.com/xiaoqidun/ihash.git
cd ihash cd ihash
go build ihash.go go build ihash.go
``` ```
# 手动安装
1. 根据系统架构下载为你编译好的[二进制文件](https://github.com/xiaoqidun/ihash/releases)
2. 将下载好的二进制文件重命名为ihash并保留后缀
3. 把ihash文件移动到系统PATH环境变量中的目录下
4. windows外的系统需使用chmod命令赋予可执行权限
# 校验类型 # 校验类型
- md5sum - md5sum
- sha1sum - sha1sum

6
go.mod
View File

@ -1,5 +1,5 @@
module ihash module github.com/xiaoqidun/ihash
go 1.14 go 1.15
require golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de require golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a

4
go.sum
View File

@ -1,6 +1,6 @@
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de h1:ikNHVSjEfnvz6sxdSPCaPt572qowuyMDMJLLm3Db3ig= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a h1:vclmkQCjlDX5OydZ9wv8rBCcS0QyQY66Mpf/7BZbInM=
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI= golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI=

View File

@ -16,15 +16,6 @@ func (b *storageBuf) asBytes() *[maxRate]byte {
return (*[maxRate]byte)(unsafe.Pointer(b)) return (*[maxRate]byte)(unsafe.Pointer(b))
} }
//go:nocheckptr
//
// xorInUnaligned intentionally reads the input buffer as an unaligned slice of
// integers. The language spec is not clear on whether that is allowed.
// See:
// https://golang.org/issue/37644
// https://golang.org/issue/37298
// https://golang.org/issue/35381
// xorInUnaligned uses unaligned reads and writes to update d.a to contain d.a // xorInUnaligned uses unaligned reads and writes to update d.a to contain d.a
// XOR buf. // XOR buf.
func xorInUnaligned(d *state, buf []byte) { func xorInUnaligned(d *state, buf []byte) {

2
vendor/modules.txt vendored
View File

@ -1,4 +1,4 @@
# golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de # golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a
## explicit ## explicit
golang.org/x/crypto/sha3 golang.org/x/crypto/sha3
# golang.org/x/sys v0.0.0-20190412213103-97732733099d # golang.org/x/sys v0.0.0-20190412213103-97732733099d