github.com/adecaro/fabric-ca@v2.0.0-alpha+incompatible/lib/server/idemix/mocks/Lib.go (about)

     1  // Code generated by mockery v1.0.0. DO NOT EDIT.
     2  package mocks
     3  
     4  import FP256BN "github.com/hyperledger/fabric-amcl/amcl/FP256BN"
     5  import amcl "github.com/hyperledger/fabric-amcl/amcl"
     6  import ecdsa "crypto/ecdsa"
     7  import idemix "github.com/hyperledger/fabric/idemix"
     8  import mock "github.com/stretchr/testify/mock"
     9  
    10  // Lib is an autogenerated mock type for the Lib type
    11  type Lib struct {
    12  	mock.Mock
    13  }
    14  
    15  // CreateCRI provides a mock function with given fields: key, unrevokedHandles, epoch, alg, rng
    16  func (_m *Lib) CreateCRI(key *ecdsa.PrivateKey, unrevokedHandles []*FP256BN.BIG, epoch int, alg idemix.RevocationAlgorithm, rng *amcl.RAND) (*idemix.CredentialRevocationInformation, error) {
    17  	ret := _m.Called(key, unrevokedHandles, epoch, alg, rng)
    18  
    19  	var r0 *idemix.CredentialRevocationInformation
    20  	if rf, ok := ret.Get(0).(func(*ecdsa.PrivateKey, []*FP256BN.BIG, int, idemix.RevocationAlgorithm, *amcl.RAND) *idemix.CredentialRevocationInformation); ok {
    21  		r0 = rf(key, unrevokedHandles, epoch, alg, rng)
    22  	} else {
    23  		if ret.Get(0) != nil {
    24  			r0 = ret.Get(0).(*idemix.CredentialRevocationInformation)
    25  		}
    26  	}
    27  
    28  	var r1 error
    29  	if rf, ok := ret.Get(1).(func(*ecdsa.PrivateKey, []*FP256BN.BIG, int, idemix.RevocationAlgorithm, *amcl.RAND) error); ok {
    30  		r1 = rf(key, unrevokedHandles, epoch, alg, rng)
    31  	} else {
    32  		r1 = ret.Error(1)
    33  	}
    34  
    35  	return r0, r1
    36  }
    37  
    38  // GenerateLongTermRevocationKey provides a mock function with given fields:
    39  func (_m *Lib) GenerateLongTermRevocationKey() (*ecdsa.PrivateKey, error) {
    40  	ret := _m.Called()
    41  
    42  	var r0 *ecdsa.PrivateKey
    43  	if rf, ok := ret.Get(0).(func() *ecdsa.PrivateKey); ok {
    44  		r0 = rf()
    45  	} else {
    46  		if ret.Get(0) != nil {
    47  			r0 = ret.Get(0).(*ecdsa.PrivateKey)
    48  		}
    49  	}
    50  
    51  	var r1 error
    52  	if rf, ok := ret.Get(1).(func() error); ok {
    53  		r1 = rf()
    54  	} else {
    55  		r1 = ret.Error(1)
    56  	}
    57  
    58  	return r0, r1
    59  }
    60  
    61  // GetRand provides a mock function with given fields:
    62  func (_m *Lib) GetRand() (*amcl.RAND, error) {
    63  	ret := _m.Called()
    64  
    65  	var r0 *amcl.RAND
    66  	if rf, ok := ret.Get(0).(func() *amcl.RAND); ok {
    67  		r0 = rf()
    68  	} else {
    69  		if ret.Get(0) != nil {
    70  			r0 = ret.Get(0).(*amcl.RAND)
    71  		}
    72  	}
    73  
    74  	var r1 error
    75  	if rf, ok := ret.Get(1).(func() error); ok {
    76  		r1 = rf()
    77  	} else {
    78  		r1 = ret.Error(1)
    79  	}
    80  
    81  	return r0, r1
    82  }
    83  
    84  // NewCredential provides a mock function with given fields: key, m, attrs, rng
    85  func (_m *Lib) NewCredential(key *idemix.IssuerKey, m *idemix.CredRequest, attrs []*FP256BN.BIG, rng *amcl.RAND) (*idemix.Credential, error) {
    86  	ret := _m.Called(key, m, attrs, rng)
    87  
    88  	var r0 *idemix.Credential
    89  	if rf, ok := ret.Get(0).(func(*idemix.IssuerKey, *idemix.CredRequest, []*FP256BN.BIG, *amcl.RAND) *idemix.Credential); ok {
    90  		r0 = rf(key, m, attrs, rng)
    91  	} else {
    92  		if ret.Get(0) != nil {
    93  			r0 = ret.Get(0).(*idemix.Credential)
    94  		}
    95  	}
    96  
    97  	var r1 error
    98  	if rf, ok := ret.Get(1).(func(*idemix.IssuerKey, *idemix.CredRequest, []*FP256BN.BIG, *amcl.RAND) error); ok {
    99  		r1 = rf(key, m, attrs, rng)
   100  	} else {
   101  		r1 = ret.Error(1)
   102  	}
   103  
   104  	return r0, r1
   105  }
   106  
   107  // NewIssuerKey provides a mock function with given fields: AttributeNames, rng
   108  func (_m *Lib) NewIssuerKey(AttributeNames []string, rng *amcl.RAND) (*idemix.IssuerKey, error) {
   109  	ret := _m.Called(AttributeNames, rng)
   110  
   111  	var r0 *idemix.IssuerKey
   112  	if rf, ok := ret.Get(0).(func([]string, *amcl.RAND) *idemix.IssuerKey); ok {
   113  		r0 = rf(AttributeNames, rng)
   114  	} else {
   115  		if ret.Get(0) != nil {
   116  			r0 = ret.Get(0).(*idemix.IssuerKey)
   117  		}
   118  	}
   119  
   120  	var r1 error
   121  	if rf, ok := ret.Get(1).(func([]string, *amcl.RAND) error); ok {
   122  		r1 = rf(AttributeNames, rng)
   123  	} else {
   124  		r1 = ret.Error(1)
   125  	}
   126  
   127  	return r0, r1
   128  }
   129  
   130  // RandModOrder provides a mock function with given fields: rng
   131  func (_m *Lib) RandModOrder(rng *amcl.RAND) (*FP256BN.BIG, error) {
   132  	ret := _m.Called(rng)
   133  
   134  	var r0 *FP256BN.BIG
   135  	if rf, ok := ret.Get(0).(func(*amcl.RAND) *FP256BN.BIG); ok {
   136  		r0 = rf(rng)
   137  	} else {
   138  		if ret.Get(0) != nil {
   139  			r0 = ret.Get(0).(*FP256BN.BIG)
   140  		}
   141  	}
   142  
   143  	var r1 error
   144  	if rf, ok := ret.Get(1).(func(*amcl.RAND) error); ok {
   145  		r1 = rf(rng)
   146  	} else {
   147  		r1 = ret.Error(1)
   148  	}
   149  
   150  	return r0, r1
   151  }