Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: go build ./...
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
test:
strategy:
matrix:
goarch: [ amd64, 386 ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run Tests
run: go test ./...
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v2.5.2

env:
GOARCH: ${{ matrix.goarch }}
build:
strategy:
matrix:
goarch: [ amd64, 386, arm64, arm ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: go build ./...
env:
GOARCH: ${{ matrix.goarch }}
10 changes: 5 additions & 5 deletions tencentyun/TLSSigAPI.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func GenPrivateMapKeyWithStringRoomID(sdkappid int, key string, userid string, e

func genUserBuf(account string, dwSdkappid int, dwAuthID uint32,
dwExpTime int, dwPrivilegeMap uint32, dwAccountType uint32, roomStr string) []byte {

appid := uint32(dwSdkappid)
offset := 0
length := 1 + 2 + len(account) + 20 + len(roomStr)
if len(roomStr) > 0 {
Expand All @@ -188,13 +188,13 @@ func genUserBuf(account string, dwSdkappid int, dwAuthID uint32,
}

//dwSdkAppid
userBuf[offset] = (byte)((dwSdkappid & 0xFF000000) >> 24)
userBuf[offset] = (byte)((appid & 0xFF000000) >> 24)
offset++
userBuf[offset] = (byte)((dwSdkappid & 0x00FF0000) >> 16)
userBuf[offset] = (byte)((appid & 0x00FF0000) >> 16)
offset++
userBuf[offset] = (byte)((dwSdkappid & 0x0000FF00) >> 8)
userBuf[offset] = (byte)((appid & 0x0000FF00) >> 8)
offset++
userBuf[offset] = (byte)(dwSdkappid & 0x000000FF)
userBuf[offset] = (byte)(appid & 0x000000FF)
offset++

//dwAuthId
Expand Down
Loading