utils

package
v0.0.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2022 License: AGPL-3.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDataInField

func CheckDataInField(data []byte) bool

CheckDataInField checks if data is in Q field

func CreateSchemaHash

func CreateSchemaHash(credentialType string) core.SchemaHash

CreateSchemaHash calculates schema hash

func DataFillsSlot

func DataFillsSlot(slot, newData []byte) bool

DataFillsSlot checks if newData fills into slot capacity ()

func FieldToByteArray

func FieldToByteArray(field interface{}) ([]byte, error)

FieldToByteArray convert fields to byte representation based on type

func FillClaimSlots

func FillClaimSlots(content []byte, indexFields, valueFields []string) (processor.ParsedSlots, error)

FillClaimSlots fullfils index and value fields to iden3 slots

func IndexOf

func IndexOf(field string, fields []string) int

IndexOf returns field index in array of fields

func Keccak256

func Keccak256(data ...[]byte) []byte

Keccak256 calculates the Keccak256 hash of the input data.

func VerifyClaimHash

func VerifyClaimHash(credential *verifiable.Iden3Credential, claim *core.Claim) error

VerifyClaimHash verifies that hashes of index and value of claim are equal to proof in credential

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL