-
Notifications
You must be signed in to change notification settings - Fork 290
/
pkg.go
81 lines (76 loc) · 1.52 KB
/
pkg.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// Code generated by cuelang.org/go/pkg/gen. DO NOT EDIT.
package sha512
import (
"cuelang.org/go/internal/core/adt"
"cuelang.org/go/pkg/internal"
)
func init() {
internal.Register("crypto/sha512", pkg)
}
var _ = adt.TopKind // in case the adt package isn't used
var pkg = &internal.Package{
Native: []*internal.Builtin{{
Name: "Size",
Const: "64",
}, {
Name: "Size224",
Const: "28",
}, {
Name: "Size256",
Const: "32",
}, {
Name: "Size384",
Const: "48",
}, {
Name: "BlockSize",
Const: "128",
}, {
Name: "Sum512",
Params: []internal.Param{
{Kind: adt.BytesKind | adt.StringKind},
},
Result: adt.BytesKind | adt.StringKind,
Func: func(c *internal.CallCtxt) {
data := c.Bytes(0)
if c.Do() {
c.Ret = Sum512(data)
}
},
}, {
Name: "Sum384",
Params: []internal.Param{
{Kind: adt.BytesKind | adt.StringKind},
},
Result: adt.BytesKind | adt.StringKind,
Func: func(c *internal.CallCtxt) {
data := c.Bytes(0)
if c.Do() {
c.Ret = Sum384(data)
}
},
}, {
Name: "Sum512_224",
Params: []internal.Param{
{Kind: adt.BytesKind | adt.StringKind},
},
Result: adt.BytesKind | adt.StringKind,
Func: func(c *internal.CallCtxt) {
data := c.Bytes(0)
if c.Do() {
c.Ret = Sum512_224(data)
}
},
}, {
Name: "Sum512_256",
Params: []internal.Param{
{Kind: adt.BytesKind | adt.StringKind},
},
Result: adt.BytesKind | adt.StringKind,
Func: func(c *internal.CallCtxt) {
data := c.Bytes(0)
if c.Do() {
c.Ret = Sum512_256(data)
}
},
}},
}