Documentation
¶
Overview ¶
Package crypto is corresponding Go package for libindy's anoncreds namespace. We suggest that you read indy SDK documentation for more information. Unfortunately the documentation during the writing of this package was minimal to nothing. We suggest you do the same as we did, read the rust code if more detailed information is needed.
Index ¶
- func AnonCrypt(recipientKey string, msg []byte) ctx.Channel
- func AnonDecrypt(wallet int, recipientKey string, msg []byte) ctx.Channel
- func AuthCrypt(wallet int, senderKey, recipientKey string, msg []byte) ctx.Channel
- func AuthDecrypt(wallet int, recipientKey string, msg []byte) ctx.Channel
- func Pack(wallet int, senderKey string, msg []byte, recipientKeys ...string) ctx.Channel
- func PackMessage(wallet int, recipientKeysJSON, senderKey string, msg []byte) ctx.Channel
- func SignMsg(wallet int, signerVerKey string, msg []byte) ctx.Channel
- func UnpackMessage(wallet int, msg []byte) ctx.Channel
- func VerifySignature(signerVerKey string, msg, sig []byte) ctx.Channel
- type Unpacked
- type Unpacking
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnonDecrypt ¶
AnonDecrypt decrypts the msg according the recipientKey
func AuthDecrypt ¶
AuthDecrypt decrypts and verifies the msg.
func Pack ¶
Pack encrypts and packs the original byte message to recipients and if sender key is set (use findy.NullString) signs it too. This is indy SDK Go wrapper.
func PackMessage ¶
PackMessage encrypts and packs the original byte message to recipients and if sender key is set (use findy.NullString) signs it too. This is indy SDK Go wrapper.
func UnpackMessage ¶
UnpackMessage is a Go wrapper for same name indy SDK function to decrypt messages packed with PackMessage.
Types ¶
type Unpacked ¶
type Unpacked struct { Message string `json:"message"` RecipientVerkey string `json:"recipient_verkey"` SenderVerkey string `json:"sender_verkey"` }
Unpacked is a helper struct to wrap json type UnpackMessage function is returning.
func NewUnpacked ¶
NewUnpacked creates a new instance of Unpacked helper wrapper of UnpackMessage function's result.
type Unpacking ¶
type Unpacking struct { Unpacked // contains filtered or unexported fields }
Unpacking is lazy fetch helper for UnpackMessage async method.
func NewUnpacking ¶
NewUnpacking inits Unpacking struct correctly i.e., it calls UnpackMessage which is async method. This makes Unpacking a lazy fetch helper. The result will be fetched with Bytes() method.