提交 d3f7a280 编写于 作者: W weijun

6947487: use HexDumpEncoder.encodeBuffer()

Reviewed-by: mullan
上级 7bc0bf18
/* /*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. * Copyright 2000-2010 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -717,7 +717,7 @@ public class Krb5LoginModule implements LoginModule { ...@@ -717,7 +717,7 @@ public class Krb5LoginModule implements LoginModule {
for (int i = 0; i < encKeys.length; i++) { for (int i = 0; i < encKeys.length; i++) {
System.out.println("EncryptionKey: keyType=" + System.out.println("EncryptionKey: keyType=" +
encKeys[i].getEType() + " keyBytes (hex dump)=" + encKeys[i].getEType() + " keyBytes (hex dump)=" +
hd.encode(encKeys[i].getBytes())); hd.encodeBuffer(encKeys[i].getBytes()));
} }
} }
......
/* /*
* Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. * Copyright 2009-2010 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -63,6 +63,6 @@ final public class AuthorizationDataEntry { ...@@ -63,6 +63,6 @@ final public class AuthorizationDataEntry {
public String toString() { public String toString() {
return "AuthorizationDataEntry: type="+type+", data=" + return "AuthorizationDataEntry: type="+type+", data=" +
data.length + " bytes:\n" + data.length + " bytes:\n" +
new sun.misc.HexDumpEncoder().encode(data); new sun.misc.HexDumpEncoder().encodeBuffer(data);
} }
} }
/* /*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. * Copyright 2000-2010 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -205,7 +205,7 @@ class KeyImpl implements SecretKey, Destroyable, Serializable { ...@@ -205,7 +205,7 @@ class KeyImpl implements SecretKey, Destroyable, Serializable {
+ " keyBytes (hex dump)=" + " keyBytes (hex dump)="
+ (keyBytes == null || keyBytes.length == 0 ? + (keyBytes == null || keyBytes.length == 0 ?
" Empty Key" : " Empty Key" :
'\n' + hd.encode(keyBytes) '\n' + hd.encodeBuffer(keyBytes)
+ '\n'); + '\n');
......
/* /*
* Portions Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * Portions Copyright 2000-2010 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -499,7 +499,8 @@ public class EncryptionKey ...@@ -499,7 +499,8 @@ public class EncryptionKey
+ " kvno=" + kvno + " kvno=" + kvno
+ " keyValue (hex dump)=" + " keyValue (hex dump)="
+ (keyValue == null || keyValue.length == 0 ? + (keyValue == null || keyValue.length == 0 ?
" Empty Key" : '\n' + Krb5.hexDumper.encode(keyValue) " Empty Key" : '\n'
+ Krb5.hexDumper.encodeBuffer(keyValue)
+ '\n')); + '\n'));
} }
......
/* /*
* Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. * Copyright 2003-2010 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -96,9 +96,9 @@ public class CertId { ...@@ -96,9 +96,9 @@ public class CertId {
HexDumpEncoder encoder = new HexDumpEncoder(); HexDumpEncoder encoder = new HexDumpEncoder();
System.out.println("Issuer Certificate is " + issuerCert); System.out.println("Issuer Certificate is " + issuerCert);
System.out.println("issuerNameHash is " + System.out.println("issuerNameHash is " +
encoder.encode(issuerNameHash)); encoder.encodeBuffer(issuerNameHash));
System.out.println("issuerKeyHash is " + System.out.println("issuerKeyHash is " +
encoder.encode(issuerKeyHash)); encoder.encodeBuffer(issuerKeyHash));
System.out.println("SerialNumber is " + serialNumber.getNumber()); System.out.println("SerialNumber is " + serialNumber.getNumber());
} }
} }
......
...@@ -2620,7 +2620,7 @@ public final class KeyTool { ...@@ -2620,7 +2620,7 @@ public final class KeyTool {
if (v.length == 0) { if (v.length == 0) {
out.println(rb.getString("(Empty value)")); out.println(rb.getString("(Empty value)"));
} else { } else {
new sun.misc.HexDumpEncoder().encode(ext.getExtensionValue(), out); new sun.misc.HexDumpEncoder().encodeBuffer(ext.getExtensionValue(), out);
out.println(); out.println();
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册