-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpepgo.go
46 lines (36 loc) · 1.08 KB
/
pepgo.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
package pepgo
import (
"github.com/stevenvegt/pep-go/curve"
)
type Pseudonym struct {
Value string
}
type Identity string
type DecryptRequest struct {
EI EncryptedIdentity
}
type ActivationRequest struct {
Identifier string
APid string
}
type ActivationResponse struct {
PP curve.Cryptogram
PI curve.Cryptogram
}
// TransformRequest is the request object for the Transform operation from polymorphic identity/pseudonym to encrypted identity/pseudonym
// It contains the polymorphic identity or pseudonym and the ServiceProvider for which the transformation is intended
type TransformRequest struct {
PI PolymorphicIdentity
PP PolymorphicPseudonym
SPIdentity string
}
// TransformResponse is the response object for the Transform operation
// It contains the encrypted identity or pseudonym for the ServiceProvider
type TransformResponse struct {
EI EncryptedIdentity
EP EncryptedPseudonym
}
type EncryptedIdentity = curve.Cryptogram
type EncryptedPseudonym = curve.Cryptogram
type PolymorphicIdentity = curve.Cryptogram
type PolymorphicPseudonym = curve.Cryptogram