-
Notifications
You must be signed in to change notification settings - Fork 2
/
util.go
43 lines (32 loc) · 1.22 KB
/
util.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package smaead
import _ "unsafe"
type PartialAEAD interface {
OpenWithoutCheck(dst, nonce, ciphertext []byte) []byte
}
//go:linkname inexactOverlap crypto/internal/subtle.InexactOverlap
//goland:noinspection GoUnusedParameter
func inexactOverlap(x, y []byte) bool
//go:linkname xorBytes crypto/cipher.xorBytes
//goland:noinspection GoUnusedParameter
func xorBytes(dst, a, b []byte) int
//go:linkname xorWords crypto/cipher.xorWords
//goland:noinspection GoUnusedParameter
func xorWords(dst, a, b []byte)
//go:linkname sliceForAppend crypto/cipher.sliceForAppend
//goland:noinspection GoUnusedParameter
func sliceForAppend(in []byte, n int) (head, tail []byte)
//go:linkname reverseBits crypto/cipher.reverseBits
//goland:noinspection GoUnusedParameter
func reverseBits(i int) int
type gcmFieldElement struct {
low, high uint64
}
//go:linkname gcmAdd crypto/cipher.gcmAdd
//goland:noinspection GoUnusedParameter
func gcmAdd(x, y *gcmFieldElement) gcmFieldElement
//go:linkname gcmDouble crypto/cipher.gcmDouble
//goland:noinspection GoUnusedParameter
func gcmDouble(x *gcmFieldElement) (double gcmFieldElement)
//go:linkname gcmInc32 crypto/cipher.gcmInc32
//goland:noinspection GoUnusedParameter
func gcmInc32(counterBlock *[16]byte)