Thanks to visit codestin.com
Credit goes to github.com

Skip to content

export and import *Element 32 base encoded #6

@thekm1

Description

@thekm1

My goal is to export an Element 32 base encoded and import it again.
I use fmt.SprintF("%32v",elm) for exporting this works fine. I will get the Element in String representation with characters between (a-v,0-9)
But if i try to Set the Element from that string with base 32. It does not work as I expect.

In the following code i expect the variable recreatedElm to be same as the variable elm. Why is this not so ? Am i understanding something wrong? Or is there a bug?

var pairing *pbc.Pairing
// ...populate pairing...
elm := pairing.NewZr().Rand()
elmString := fmt.Sprintf("%32v", elm)
recreatedElm := pairing.NewZr().SetString(elmString, 32)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions