Class IdemixUtils
- java.lang.Object
 - 
- org.hyperledger.fabric.sdk.idemix.IdemixUtils
 
 
- 
public final class IdemixUtils extends java.lang.ObjectThe class IdemixUtils consists of all needed utility functions for Idemix. The class uses the apache milagro crypto library. 
- 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]bigToBytes(org.apache.milagro.amcl.FP256BN.BIG big)bigToBytes turns a BIG into a byte arraystatic org.apache.milagro.amcl.RANDgetRand()Returns a random number generator, amcl.RAND, initialized with a fresh seed.static org.apache.milagro.amcl.FP256BN.BIGhashModOrder(byte[] data)hashModOrder hashes bytes to an amcl.BIG in 0, ..., GROUP_ORDERstatic org.apache.milagro.amcl.FP256BN.BIGrandModOrder(org.apache.milagro.amcl.RAND rng) 
 - 
 
- 
- 
Method Detail
- 
getRand
public static org.apache.milagro.amcl.RAND getRand()
Returns a random number generator, amcl.RAND, initialized with a fresh seed.- Returns:
 - a random number generator
 
 
- 
randModOrder
public static org.apache.milagro.amcl.FP256BN.BIG randModOrder(org.apache.milagro.amcl.RAND rng)
- Returns:
 - a random BIG in 0, ..., GROUP_ORDER-1
 
 
- 
hashModOrder
public static org.apache.milagro.amcl.FP256BN.BIG hashModOrder(byte[] data)
hashModOrder hashes bytes to an amcl.BIG in 0, ..., GROUP_ORDER- Parameters:
 data- the data to be hashed- Returns:
 - a BIG in 0, ..., GROUP_ORDER-1 that is the hash of the data
 
 
- 
bigToBytes
public static byte[] bigToBytes(org.apache.milagro.amcl.FP256BN.BIG big)
bigToBytes turns a BIG into a byte array- Parameters:
 big- the BIG to turn into bytes- Returns:
 - a byte array representation of the BIG
 
 
 - 
 
 -