Skip to content
This repository was archived by the owner on Jan 29, 2026. It is now read-only.
This repository was archived by the owner on Jan 29, 2026. It is now read-only.

export and import *Element 32 base encoded #6

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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