6947487: use HexDumpEncoder.encodeBuffer()
authorweijun
Thu, 29 Apr 2010 15:50:40 +0800
changeset 5457 d2782f1ecc9f
parent 5456 40ff273941a2
child 5458 62f857d96000
6947487: use HexDumpEncoder.encodeBuffer() Reviewed-by: mullan
jdk/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java
jdk/src/share/classes/com/sun/security/jgss/AuthorizationDataEntry.java
jdk/src/share/classes/javax/security/auth/kerberos/KeyImpl.java
jdk/src/share/classes/sun/security/krb5/EncryptionKey.java
jdk/src/share/classes/sun/security/provider/certpath/CertId.java
jdk/src/share/classes/sun/security/tools/KeyTool.java
--- a/jdk/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java	Tue Apr 27 09:42:51 2010 +0100
+++ b/jdk/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java	Thu Apr 29 15:50:40 2010 +0800
@@ -1,5 +1,5 @@
 /*
- * 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.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -717,7 +717,7 @@
                     for (int i = 0; i < encKeys.length; i++) {
                         System.out.println("EncryptionKey: keyType=" +
                             encKeys[i].getEType() + " keyBytes (hex dump)=" +
-                            hd.encode(encKeys[i].getBytes()));
+                            hd.encodeBuffer(encKeys[i].getBytes()));
                     }
                 }
 
--- a/jdk/src/share/classes/com/sun/security/jgss/AuthorizationDataEntry.java	Tue Apr 27 09:42:51 2010 +0100
+++ b/jdk/src/share/classes/com/sun/security/jgss/AuthorizationDataEntry.java	Thu Apr 29 15:50:40 2010 +0800
@@ -1,5 +1,5 @@
 /*
- * 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.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -63,6 +63,6 @@
     public String toString() {
         return "AuthorizationDataEntry: type="+type+", data=" +
                 data.length + " bytes:\n" +
-                new sun.misc.HexDumpEncoder().encode(data);
+                new sun.misc.HexDumpEncoder().encodeBuffer(data);
     }
 }
--- a/jdk/src/share/classes/javax/security/auth/kerberos/KeyImpl.java	Tue Apr 27 09:42:51 2010 +0100
+++ b/jdk/src/share/classes/javax/security/auth/kerberos/KeyImpl.java	Thu Apr 29 15:50:40 2010 +0800
@@ -1,5 +1,5 @@
 /*
- * 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.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -205,7 +205,7 @@
                           + " keyBytes (hex dump)="
                           + (keyBytes == null || keyBytes.length == 0 ?
                              " Empty Key" :
-                             '\n' + hd.encode(keyBytes)
+                             '\n' + hd.encodeBuffer(keyBytes)
                           + '\n');
 
 
--- a/jdk/src/share/classes/sun/security/krb5/EncryptionKey.java	Tue Apr 27 09:42:51 2010 +0100
+++ b/jdk/src/share/classes/sun/security/krb5/EncryptionKey.java	Thu Apr 29 15:50:40 2010 +0800
@@ -1,5 +1,5 @@
 /*
- * 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.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -499,8 +499,9 @@
                           + " kvno=" + kvno
                           + " keyValue (hex dump)="
                           + (keyValue == null || keyValue.length == 0 ?
-                        " Empty Key" : '\n' + Krb5.hexDumper.encode(keyValue)
-                             + '\n'));
+                        " Empty Key" : '\n'
+                        + Krb5.hexDumper.encodeBuffer(keyValue)
+                        + '\n'));
     }
 
     /**
--- a/jdk/src/share/classes/sun/security/provider/certpath/CertId.java	Tue Apr 27 09:42:51 2010 +0100
+++ b/jdk/src/share/classes/sun/security/provider/certpath/CertId.java	Thu Apr 29 15:50:40 2010 +0800
@@ -1,5 +1,5 @@
 /*
- * 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.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -96,9 +96,9 @@
             HexDumpEncoder encoder = new HexDumpEncoder();
             System.out.println("Issuer Certificate is " + issuerCert);
             System.out.println("issuerNameHash is " +
-                encoder.encode(issuerNameHash));
+                encoder.encodeBuffer(issuerNameHash));
             System.out.println("issuerKeyHash is " +
-                encoder.encode(issuerKeyHash));
+                encoder.encodeBuffer(issuerKeyHash));
             System.out.println("SerialNumber is " + serialNumber.getNumber());
         }
     }
--- a/jdk/src/share/classes/sun/security/tools/KeyTool.java	Tue Apr 27 09:42:51 2010 +0100
+++ b/jdk/src/share/classes/sun/security/tools/KeyTool.java	Thu Apr 29 15:50:40 2010 +0800
@@ -2620,7 +2620,7 @@
                 if (v.length == 0) {
                     out.println(rb.getString("(Empty value)"));
                 } else {
-                    new sun.misc.HexDumpEncoder().encode(ext.getExtensionValue(), out);
+                    new sun.misc.HexDumpEncoder().encodeBuffer(ext.getExtensionValue(), out);
                     out.println();
                 }
             }