这里面包含了一百多个JAVA源文件

源代码在线查看: e468. generating a message authentication code (mac) key.txt

软件大小: 551 K
上传用户: maple_78
关键词: JAVA
下载地址: 免注册下载 普通下载 VIP

相关代码

				For more information on a MAC, see RFC 2104. See also e467 Listing All Available Message Authentication Code (MAC) Key Generators. 
				    try {
				        // Generate a key for the HMAC-MD5 keyed-hashing algorithm
				        KeyGenerator keyGen = KeyGenerator.getInstance("HmacMD5");
				        SecretKey key = keyGen.generateKey();
				    
				        // Generate a key for the HMAC-SHA1 keyed-hashing algorithm
				        keyGen = KeyGenerator.getInstance("HmacSHA1");
				        key = keyGen.generateKey();
				    } catch (java.security.NoSuchAlgorithmException e) {
				    }
				
							

相关资源