本文整理汇总了Java中sun.security.krb5.Checksum.CKSUMTYPE_HMAC_SHA1_96_AES256属性的典型用法代码示例。如果您正苦于以下问题:Java Checksum.CKSUMTYPE_HMAC_SHA1_96_AES256属性的具体用法?Java Checksum.CKSUMTYPE_HMAC_SHA1_96_AES256怎么用?Java Checksum.CKSUMTYPE_HMAC_SHA1_96_AES256使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类sun.security.krb5.Checksum
的用法示例。
在下文中一共展示了Checksum.CKSUMTYPE_HMAC_SHA1_96_AES256属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: process
@Override
public void process(int pacInfoBufferType, byte[] pacInfoBufferBytes) throws IOException {
super.process(pacInfoBufferType, pacInfoBufferBytes);
ByteBuffer pacDataStream = ByteBuffer.wrap(pacInfoBufferBytes);
pacDataStream.order(ByteOrder.LITTLE_ENDIAN);
this.signatureType = pacDataStream.getInt();
int signatureSize = 0;
switch (signatureType) {
case Checksum.CKSUMTYPE_HMAC_MD5_ARCFOUR:
signatureSize = 16;
break;
case Checksum.CKSUMTYPE_HMAC_SHA1_96_AES128:
signatureSize = 12;
break;
case Checksum.CKSUMTYPE_HMAC_SHA1_96_AES256:
signatureSize = 12;
break;
default:
throw new IOException("PAC signature using unknown encryption algorithm");
}
int sigStartPosition = pacDataStream.position();
byte[] sigBytes = new byte[signatureSize];
pacDataStream.get(sigBytes);
this.signatureBytes = sigBytes;;
for (int i=0; i < signatureSize; i++){
pacInfoBufferBytes[sigStartPosition + i] = (byte)0;
}
this.zeroedSignaturePacSignatureData = pacInfoBufferBytes;
//short rodcIdentifier = pacDataStream.getShort();
}
示例2: checksumType
public int checksumType() {
return Checksum.CKSUMTYPE_HMAC_SHA1_96_AES256;
}
示例3: cksumType
public int cksumType() {
return Checksum.CKSUMTYPE_HMAC_SHA1_96_AES256;
}
示例4: getInstance
public static CksumType getInstance(int cksumTypeConst)
throws KdcErrException {
CksumType cksumType = null;
String cksumTypeName = null;
switch (cksumTypeConst) {
case Checksum.CKSUMTYPE_CRC32:
cksumType = new Crc32CksumType();
cksumTypeName = "sun.security.krb5.internal.crypto.Crc32CksumType";
break;
case Checksum.CKSUMTYPE_DES_MAC:
cksumType = new DesMacCksumType();
cksumTypeName = "sun.security.krb5.internal.crypto.DesMacCksumType";
break;
case Checksum.CKSUMTYPE_DES_MAC_K:
cksumType = new DesMacKCksumType();
cksumTypeName =
"sun.security.krb5.internal.crypto.DesMacKCksumType";
break;
case Checksum.CKSUMTYPE_RSA_MD5:
cksumType = new RsaMd5CksumType();
cksumTypeName = "sun.security.krb5.internal.crypto.RsaMd5CksumType";
break;
case Checksum.CKSUMTYPE_RSA_MD5_DES:
cksumType = new RsaMd5DesCksumType();
cksumTypeName =
"sun.security.krb5.internal.crypto.RsaMd5DesCksumType";
break;
case Checksum.CKSUMTYPE_HMAC_SHA1_DES3_KD:
cksumType = new HmacSha1Des3KdCksumType();
cksumTypeName =
"sun.security.krb5.internal.crypto.HmacSha1Des3KdCksumType";
break;
case Checksum.CKSUMTYPE_HMAC_SHA1_96_AES128:
cksumType = new HmacSha1Aes128CksumType();
cksumTypeName =
"sun.security.krb5.internal.crypto.HmacSha1Aes128CksumType";
break;
case Checksum.CKSUMTYPE_HMAC_SHA1_96_AES256:
cksumType = new HmacSha1Aes256CksumType();
cksumTypeName =
"sun.security.krb5.internal.crypto.HmacSha1Aes256CksumType";
break;
case Checksum.CKSUMTYPE_HMAC_MD5_ARCFOUR:
cksumType = new HmacMd5ArcFourCksumType();
cksumTypeName =
"sun.security.krb5.internal.crypto.HmacMd5ArcFourCksumType";
break;
// currently we don't support MD4.
case Checksum.CKSUMTYPE_RSA_MD4_DES_K:
// cksumType = new RsaMd4DesKCksumType();
// cksumTypeName =
// "sun.security.krb5.internal.crypto.RsaMd4DesKCksumType";
case Checksum.CKSUMTYPE_RSA_MD4:
// cksumType = new RsaMd4CksumType();
// linux box support rsamd4, how to solve conflict?
// cksumTypeName =
// "sun.security.krb5.internal.crypto.RsaMd4CksumType";
case Checksum.CKSUMTYPE_RSA_MD4_DES:
// cksumType = new RsaMd4DesCksumType();
// cksumTypeName =
// "sun.security.krb5.internal.crypto.RsaMd4DesCksumType";
default:
throw new KdcErrException(Krb5.KDC_ERR_SUMTYPE_NOSUPP);
}
if (DEBUG) {
System.out.println(">>> CksumType: " + cksumTypeName);
}
return cksumType;
}