public Object clone() { return new UMacGenerator(this); }
/** * <p>Constructs an instance of the <code>KDF</code> initialised with the * designated shared secret bytes.</p> * * @param keyMaterial the SASL SRP shared secret (K) bytes. */ private KDF(final byte[] keyMaterial, final int ndx) { super(); // if (ndx != 0) { // this.keyMaterial = (byte[]) keyMaterial.clone(); // } final HashMap map = new HashMap(); map.put(UMacGenerator.CIPHER, Registry.AES_CIPHER); map.put(UMacGenerator.INDEX, new Integer(ndx)); map.put(IBlockCipher.CIPHER_BLOCK_SIZE, new Integer(AES_BLOCK_SIZE)); final byte[] key = new byte[AES_KEY_SIZE]; System.arraycopy(keyMaterial, 0, key, 0, AES_KEY_SIZE); map.put(IBlockCipher.KEY_MATERIAL, key); umac = new UMacGenerator(); umac.init(map); //System.out.println("**** Initialised KDF with: "+gnu.crypto.util.Util.dumpString(key)); }
result = new MDGenerator(); } else if (prng.equalsIgnoreCase(UMAC_PRNG)) { result = new UMacGenerator(); } else if (prng.toLowerCase().startsWith(PBKDF2_PRNG_PREFIX)) { String macName = prng.substring(PBKDF2_PRNG_PREFIX.length());
IRandom kdf = new UMacGenerator(); Map map = new HashMap(); map.put(IBlockCipher.KEY_MATERIAL, K);
IRandom kdf1 = new UMacGenerator(); IRandom kdf2 = new UMacGenerator(); IRandom kdf3 = new UMacGenerator(); IRandom kdf4 = new UMacGenerator(); Map map = new HashMap(); map.put(IBlockCipher.KEY_MATERIAL, K);