private void kdf(ECPoint c1, byte[] encData) {
		final Digest digest = this.digest;
		int digestSize = digest.getDigestSize();
		byte[] buf = new byte[Math.max(4, digestSize)];
		int off = 0;

		Memoable memo = null;
		Memoable copy = null;

		if (digest instanceof Memoable) {
			addFieldElement(c1.getAffineXCoord());
			addFieldElement(c1.getAffineYCoord());
			memo = (Memoable) digest;
			copy = memo.copy();
		}

		int ct = 0;

		while (off < encData.length) {
			if (memo != null) {
				memo.reset(copy);
			} else {
				addFieldElement(c1.getAffineXCoord());
				addFieldElement(c1.getAffineYCoord());
			}

			Pack.intToBigEndian(++ct, buf, 0);
			digest.update(buf, 0, 4);
			digest.doFinal(buf, 0);

			int xorLen = Math.min(digestSize, encData.length - off);
			xor(encData, buf, off, xorLen);
			off += xorLen;
		}
	}
private void kdf ( ECPoint c1 , byte [ ] encData ) { final Digest digest = this . digest ; int digestSize = digest . getDigestSize ( ) ; byte [ ] buf = new byte [ Math . max ( 4 , digestSize ) ] ; int off = 0 ; Memoable memo = null ; Memoable copy = null ; if ( digest instanceof Memoable ) { addFieldElement ( c1 . getAffineXCoord ( ) ) ; addFieldElement ( c1 . getAffineYCoord ( ) ) ; memo = ( Memoable ) digest ; copy = memo . copy ( ) ; } int ct = 0 ; while ( off < encData . length ) { if ( memo != null ) { memo . reset ( copy ) ; } else { addFieldElement ( c1 . getAffineXCoord ( ) ) ; addFieldElement ( c1 . getAffineYCoord ( ) ) ; } Pack . intToBigEndian ( ++ ct , buf , 0 ) ; digest . update ( buf , 0 , 4 ) ; digest . doFinal ( buf , 0 ) ; int xorLen = Math . min ( digestSize , encData . length - off ) ; xor ( encData , buf , off , xorLen ) ; off += xorLen ; } }
解密数据

@param c1 c1点
@param encData 密文