forked from xlab-si/emmy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdoc.go
More file actions
74 lines (73 loc) · 2.59 KB
/
Copy pathdoc.go
File metadata and controls
74 lines (73 loc) · 2.59 KB
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
/*
* Copyright 2017 XLAB d.o.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
// Package compatibility implements wrapper types, constants and functions around
// github.com/xlab-si/emmy/client, making relevant functionality compatible with go language
// binding tools. All the constructs defined in this package are compatible with gobind tool that
// generates language bindings for Java or Objective C in order to expose Go code to Android or
// iOS mobile applications.
//
// The gobind tool imposes several restrictions on the types of exported fields,
// function parameters and their return values.
// Read more about them here: https://godoc.org/golang.org/x/mobile/cmd/gobind.
//
// Only Java bindings generated from this package were tested.
//
// Generating language bindings
//
// To generate Java bindings for use in an Android application,
// read the overview of gomobile tool (https://godoc.org/golang.org/x/mobile/cmd/gomobile).
// When you are all set, run:
// gomobile bind -v -o emmy.aar github.com/xlab-si/emmy/client/compatibility
// This command will produce an Android archive (.
// AAR) named emmy.aar from compatibility package.
// You can add generated AAR as a dependency to your Android application.
// Then, you can import Go types,
// functions and constants as regular Java types from the Java package compatibility. For instance,
// see Java code snippet below:
// import compatibility.Connetion;
// import compatibility.ConnectionConfig;
// ...
// ConnectionConfig cfg = new ConnectionConfig("localhost:7007", "", cert.getBytes());
// Connection conn = new Connection(cfg)
//
// Go types exposed to Java code
//
// Generic types:
// ConnectionConfig
// Connection
// Logger
// ServiceInfo
//
// Clients that allow us to execute various interactive cryptographic protocols with the server:
// PseudonymsysCAClient
// PseudonymsysClient
// PseudonymsysCAECClient
// PseudonymsysECClient
//
// Cryptographic types:
// CACertificate
// CACertificateEC
// Credential
// CredentialEC
// ECGroupElement
// PubKey
// PubKeyEC
// Transcript
// TranscriptEC
// Pseudonym
// PseudonymEC
package compatibility