public static boolean checkpw(String plaintext, String hashed) {
		byte[] hashed_bytes;
		byte[] try_bytes;

		String try_pw;
		try{
			try_pw = hashpw(plaintext, hashed);
		} catch (Exception ignore){
			// 生成密文时错误直接返回false issue#1377@Github
			return false;
		}
		hashed_bytes = hashed.getBytes(CharsetUtil.CHARSET_UTF_8);
		try_bytes = try_pw.getBytes(CharsetUtil.CHARSET_UTF_8);
		if (hashed_bytes.length != try_bytes.length) {
			return false;
		}
		byte ret = 0;
		for (int i = 0; i < try_bytes.length; i++)
			ret |= hashed_bytes[i] ^ try_bytes[i];
		return ret == 0;
	}
@Test
	public void checkpwTest(){
		assertFalse(BCrypt.checkpw("xxx",
				"$2a$2a$10$e4lBTlZ019KhuAFyqAlgB.Jxc6cM66GwkSR/5/xXNQuHUItPLyhzy"));
	}