Example usage for org.bouncycastle.crypto.generators KDF1BytesGenerator KDF1BytesGenerator

List of usage examples for org.bouncycastle.crypto.generators KDF1BytesGenerator KDF1BytesGenerator

Introduction

In this page you can find the example usage for org.bouncycastle.crypto.generators KDF1BytesGenerator KDF1BytesGenerator.

Prototype

public KDF1BytesGenerator(Digest digest) 

Source Link

Document

Construct a KDF1 byte generator.

Usage

From source file:edu.biu.scapi.primitives.kdf.bc.BcKdfISO18033.java

License:Open Source License

/**
 * creates the related bc kdf. Retrieve the related digest out of the given hash name.
 * @param hash name of the underlying hash to use
 * @throws FactoriesException in case of error while creating the object
 *//*from  w  w w.  j  a v a 2 s .  c  o  m*/
public BcKdfISO18033(String hash) throws FactoriesException {
    //creates a digest through the factory and passes it to the KDF
    bcKdfGenerator = new KDF1BytesGenerator(BCFactory.getInstance().getDigest(hash));
}

From source file:edu.biu.scapi.primitives.kdf.bc.BcKdfISO18033.java

License:Open Source License

/**
 * creates the related bc kdf, with the given hash
 * @param hash - the underlying collision resistant hash
 * @throws FactoriesException in case of error while creating the object
 *//*from  w w w.ja v  a  2 s  . c  o m*/
public BcKdfISO18033(CryptographicHash hash) throws FactoriesException {

    //creates a digest of the given hash type through the factory and passes it to the KDF
    bcKdfGenerator = new KDF1BytesGenerator(BCFactory.getInstance().getDigest(hash.getAlgorithmName()));
}