-
Notifications
You must be signed in to change notification settings - Fork 5
/
message_info_footer.go
112 lines (91 loc) · 2.76 KB
/
message_info_footer.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
package foundation
// #include <virgil/crypto/foundation/vscf_foundation_public.h>
import "C"
import unsafe "unsafe"
import "runtime"
/*
* Handle message signatures and related information.
*/
type MessageInfoFooter struct {
cCtx *C.vscf_message_info_footer_t /*ct2*/
}
/* Handle underlying C context. */
func (obj *MessageInfoFooter) Ctx() uintptr {
return uintptr(unsafe.Pointer(obj.cCtx))
}
func NewMessageInfoFooter() *MessageInfoFooter {
ctx := C.vscf_message_info_footer_new()
obj := &MessageInfoFooter {
cCtx: ctx,
}
runtime.SetFinalizer(obj, (*MessageInfoFooter).Delete)
return obj
}
/* Acquire C context.
* Note. This method is used in generated code only, and SHOULD NOT be used in another way.
*/
func newMessageInfoFooterWithCtx(ctx *C.vscf_message_info_footer_t /*ct2*/) *MessageInfoFooter {
obj := &MessageInfoFooter {
cCtx: ctx,
}
runtime.SetFinalizer(obj, (*MessageInfoFooter).Delete)
return obj
}
/* Acquire retained C context.
* Note. This method is used in generated code only, and SHOULD NOT be used in another way.
*/
func newMessageInfoFooterCopy(ctx *C.vscf_message_info_footer_t /*ct2*/) *MessageInfoFooter {
obj := &MessageInfoFooter {
cCtx: C.vscf_message_info_footer_shallow_copy(ctx),
}
runtime.SetFinalizer(obj, (*MessageInfoFooter).Delete)
return obj
}
/*
* Release underlying C context.
*/
func (obj *MessageInfoFooter) Delete() {
if obj == nil {
return
}
runtime.SetFinalizer(obj, nil)
obj.delete()
}
/*
* Release underlying C context.
*/
func (obj *MessageInfoFooter) delete() {
C.vscf_message_info_footer_delete(obj.cCtx)
}
/*
* Return true if at least one signer info presents.
*/
func (obj *MessageInfoFooter) HasSignerInfos() bool {
proxyResult := /*pr4*/C.vscf_message_info_footer_has_signer_infos(obj.cCtx)
runtime.KeepAlive(obj)
return bool(proxyResult) /* r9 */
}
/*
* Return list with a "signer info" elements.
*/
func (obj *MessageInfoFooter) SignerInfos() *SignerInfoList {
proxyResult := /*pr4*/C.vscf_message_info_footer_signer_infos(obj.cCtx)
runtime.KeepAlive(obj)
return newSignerInfoListCopy(proxyResult) /* r5 */
}
/*
* Return information about algorithm that was used for data hashing.
*/
func (obj *MessageInfoFooter) SignerHashAlgInfo() (AlgInfo, error) {
proxyResult := /*pr4*/C.vscf_message_info_footer_signer_hash_alg_info(obj.cCtx)
runtime.KeepAlive(obj)
return FoundationImplementationWrapAlgInfo(proxyResult) /* r4 */
}
/*
* Return plain text digest that was used to produce signature.
*/
func (obj *MessageInfoFooter) SignerDigest() []byte {
proxyResult := /*pr4*/C.vscf_message_info_footer_signer_digest(obj.cCtx)
runtime.KeepAlive(obj)
return helperExtractData(proxyResult) /* r1 */
}