michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: package org.mozilla.gecko.sync.jpake; michael@0: michael@0: import java.math.BigInteger; michael@0: michael@0: import org.mozilla.gecko.sync.Utils; michael@0: michael@0: /** michael@0: * Helper Function to generate a uniformly random value in [0, r). michael@0: */ michael@0: public class JPakeNumGeneratorRandom implements JPakeNumGenerator { michael@0: michael@0: @Override michael@0: public BigInteger generateFromRange(BigInteger r) { michael@0: return Utils.generateBigIntegerLessThan(r); michael@0: } michael@0: }