1. 因子
上次介绍了《JAVA实现AES加密》,中间提到近些年DES使用越来越少,原因就在于其使用56位密钥,比较容易被破解,近些年来逐渐被AES替代,AES已经变成目前对称加密中最流行算法之一;AES可以使用128、192、和256位密钥,并且用128位分组加密和解密数据。本文就简单介绍如何通过JAVA实现AES加密。
2. JAVA实现
闲话少许,掠过AES加密原理及算法,关于这些直接搜索专业网站吧,我们直接看JAVA的具体实现。
2.1 加密
代码有详细解释,不多废话。
/**
* 加密
*
* @param content 需要加密的内容
* @param password 加密密码
* @return
*/
public static byte[] encrypt(String content, String pass ......
1.AJAX基础知识_选择题
1. Ajax有四种技术组成:DOM,CSS,JavaScript,XmlHttpRequest中控制文档结构的是:( )
A DOM
B CSS
C javascript
D XMLHttpRequest
参考答案:A
2. 在Ajax的四种技术中,控制通信的是哪一个?( )
A DOM
B CSS
C javascript
D XMLHttpRequest
参考答案:D
3. 在Ajax的四种技术中,JavaScript的主要作用是:()
A 控制页面显示风格
B 控制文档结构
C 控制通信
D 控制其他的三个对象
参考答案:D
4. 请按XMLHttpRequest发送请求的一般步骤的顺序从以下选项中选择正确的答案:( )
A xhr.onreadstatechange
B xhr.open()
C xhr.send()
D create XMLHttpRequest xhr
参考答案:DABC
5. 在处理应答中,如果我们要以文本的方式处理,我们需要在参数表中放置XMLHttpRequest对象的什么属性?( )
A xhr.responseText
B xhr.responseXML
C xhr.requestText
D xhr.requestXML
参考答案:A ......
public static String htmlEncode(String pstrWord)
{
if((pstrWord != null)&&(pstrWord != ""))
{
StringBuffer pobjBuffer = new StringBuffer();
int j = pstrWord.length();
for (int i = 0; i < j; i++)
{
char c = pstrWord.charAt(i);
switch (c)
{
case 60 &n ......
1. JavaScript是一门基于解释性的语言,它和java语言的区别?
参考答案:java语言中变量的数据类型总体可以分为:基本数据类型和对象类型。JS语言中的变量是没有数据类型的,但是JS的基本程序控制和java是一样的在JavaScript语言中,虽然变量是没有数据类型或者是若数据类型但是他们的值是有三种基本数据类型的分别是数字、文本字符串、boolean类型,除基本数据类型以外,JavaScript还支持复合类型Object(对象)、Array(数组)特殊数据类型有null和undefine(未定义的)Js是弱数据类型的语言,其变量没有数据类型。所有变量声明时都使用var类型。而且统一变量可以分别存储不同类型的值。
2. JavaScript在使用的过程中,浏览器之间存在什么样的差异?
参考答案: 1) 设置属性:
FireFox element.setAttribute( "name","value");
IE element.name = value
2) 设置css
FireFox element.setAttribute( "style", "color:blue");
IE element.style.cssText = "color:blue";
FireFox element.setAttribute( "class","xxx" ) ;
IE element.className ;
3. JS中的三种弹出式消息提醒( ......
1.Servlet程序的入口点是:( )
A init()
B main()
C service()
D doGet()
参考答案:A
2. Severlet中,HttpSeverletResponse的什么方法用来把一个HTTP请求重定向到另外的URL?( )
A sendURL()
B redirectURL()
C sendRedirect()
D redirectResponse()
参考答案:C
3. J2EE中,当把来自客户机的HTTP请求委托给servlet时,会调用HttpServlet的什么方法?( )
A service()
B doGet()
C doPost()
D init()
参考答案:A
4. 给定一个Servlet程序的代码片段,如下:
Public void doPost(HttpServletRequest request,HttpServletResponse response)
throws ServletException,IOException{
request.getSession().getAttribute(“A”);}
假定第二行返回的对象引用不是null,那么这个对象存储在什么范围中?( )
A page
B session
C request
D application
参考答案:B
5. 给定某程序的片断如下,用户在浏览器地址栏中键入正确的请求URL并回车后,在控制台上显示的结果是:( )
public void ......
http://www.ajaxlines.com/ajax/stuff/article/using_google_is_ajax_search_api_with_java.php
I was rather depressed over a year ago when Google deprecated their SOAP Search API with their AJAX Search API. Essentially Google was saying that they didn want anyone programmatically accessing Google search results unless they were going to be presenting the results unaltered in a rectangular portion of a website. This was particularly troubling to me because, like many academics, I have relied on the API to do automated queries, especially for Warrick.
A few months ago I got a little excited when Google opened their AJAX API to non-JavaScript environments. Google is now allowing queries using a REST-based interface that returns search results using JSON. The purpose of this API is still to show unaltered results to your website is user, but I don see anything in the Terms of Use that prevent the API being used in an automated fashion (having a program regularly execute queries), especially f ......
http://www.ajaxlines.com/ajax/stuff/article/using_google_is_ajax_search_api_with_java.php
I was rather depressed over a year ago when Google deprecated their SOAP Search API with their AJAX Search API. Essentially Google was saying that they didn want anyone programmatically accessing Google search results unless they were going to be presenting the results unaltered in a rectangular portion of a website. This was particularly troubling to me because, like many academics, I have relied on the API to do automated queries, especially for Warrick.
A few months ago I got a little excited when Google opened their AJAX API to non-JavaScript environments. Google is now allowing queries using a REST-based interface that returns search results using JSON. The purpose of this API is still to show unaltered results to your website is user, but I don see anything in the Terms of Use that prevent the API being used in an automated fashion (having a program regularly execute queries), especially f ......