All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.dbstarll.utils.lang.security.KeyGeneratorBuilder Maven / Gradle / Ivy

The newest version!
package io.github.dbstarll.utils.lang.security;

import javax.crypto.KeyGenerator;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;

public final class KeyGeneratorBuilder extends AbstractSecurityBuilder {
  public KeyGeneratorBuilder(KeyGeneratorAlgorithm algorithm) throws NoSuchAlgorithmException, InstanceException {
    super(KeyGenerator.class, algorithm);
  }

  public KeyGeneratorBuilder keySize(int keysize, SecureRandom random) {
    type.init(keysize, random);
    return this;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy