docs: @Override
  	public byte[] encrypt(byte[] data, KeyType keyType) {
  		final Key key = getKeyByType(keyType);
  		final int inputLen = data.length;
  		final int maxBlockSize = this.encryptBlockSize < 0 ? inputLen : this.encryptBlockSize;
  
  		lock.lock();
  		try (ByteArrayOutputStream out = new ByteArrayOutputStream();) {
  			cipher.init(Cipher.ENCRYPT_MODE, key);
  			int offSet = 0;
  			byte[] cache;
  			// 剩余长度
  			int remainLength = inputLen;
  			// 对数据分段加密
  			while (remainLength > 0) {
  				cache = cipher.doFinal(data, offSet, Math.min(remainLength, maxBlockSize));
  				out.write(cache, 0, cache.length);
  
  				offSet += maxBlockSize;
  				remainLength = inputLen - offSet;
  			}
  			return out.toByteArray();
  		} catch (Exception e) {
  			throw new CryptoException(e);
  		} finally {
  			lock.unlock();
  		}
  	}