@Override public int getInt(String name, int def) { return parent.getInt(name, def); }
/** * <p>Constructor for AurisSender.</p> * * @param config a {@link de.mhus.lib.core.IProperties} object. */ public AurisSender(IProperties config) { port = config.getInt("port", 2030); host = config.getString("host", "localhost"); name = config.getString("name",host + ":" + port); }
@Override public PemPair createKeys(IProperties properties) throws MException { int length = properties.getInt(CryptApi.LENGTH, 256); length = length / 8 * 8; byte[] key = new byte[length/8]; MRandom random = MApi.lookup(MRandom.class); for (int i = 0; i < key.length; i++) key[i] = random.getByte(); UUID privId = UUID.randomUUID(); PemKey xpriv = new PemKey(PemBlock.BLOCK_PRIV, key, true ) .set(PemBlock.METHOD, getName()) .set(PemBlock.LENGTH, length) .set(PemBlock.IDENT, privId); return new PemKeyPair(xpriv, xpriv); }
try { if (properties == null) properties = new MProperties(); int len = properties.getInt(CryptApi.LENGTH, 1024); // 8192 KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA"); MRandom random = MApi.lookup(MRandom.class);
try { if (properties == null) properties = new MProperties(); int len = properties.getInt(CryptApi.LENGTH, 1024); KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA", "BC"); MRandom random = MApi.lookup(MRandom.class);
else if (type == Integer.class || type == int.class) attr.set(to, from.getInt(name, 0)); else if (type == String.class) if (type.isEnum()) { Object[] cons=type.getEnumConstants(); int ord = from.getInt(name, 0); Object c = cons.length > 0 ? cons[0] : null; if (ord >=0 && ord < cons.length) c = cons[ord];
try { if (properties == null) properties = new MProperties(); int len = properties.getInt(CryptApi.LENGTH, 1024); KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA", "BC"); MRandom random = MApi.lookup(MRandom.class);
try { if (properties == null) properties = new MProperties(); int len = properties.getInt(CryptApi.LENGTH, 1024); // 8192 KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA"); MRandom random = MApi.lookup(MRandom.class);
try { if (properties == null) properties = new MProperties(); int len = properties.getInt(CryptApi.LENGTH, 1024); KeyPairGenerator keyGen = KeyPairGenerator.getInstance("DSA", "SUN"); MRandom random = MApi.lookup(MRandom.class);