本文整理汇总了Java中sun.security.util.Debug.toHexString方法的典型用法代码示例。如果您正苦于以下问题:Java Debug.toHexString方法的具体用法?Java Debug.toHexString怎么用?Java Debug.toHexString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sun.security.util.Debug
的用法示例。
在下文中一共展示了Debug.toHexString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toString
import sun.security.util.Debug; //导入方法依赖的package包/类
/**
* Return a human readable rendition of the engine.
*/
public String toString() {
String printable = "DSA Signature";
if (presetP != null && presetQ != null && presetG != null) {
printable += "\n\tp: " + Debug.toHexString(presetP);
printable += "\n\tq: " + Debug.toHexString(presetQ);
printable += "\n\tg: " + Debug.toHexString(presetG);
} else {
printable += "\n\t P, Q or G not initialized.";
}
if (presetY != null) {
printable += "\n\ty: " + Debug.toHexString(presetY);
}
if (presetY == null && presetX == null) {
printable += "\n\tUNINIIALIZED";
}
return printable;
}
示例2: toString
import sun.security.util.Debug; //导入方法依赖的package包/类
public String toString() {
HexDumpEncoder hexDump = new HexDumpEncoder();
String out = "";
out += "Signer Info for (issuer): " + issuerName + "\n";
out += "\tversion: " + Debug.toHexString(version) + "\n";
out += "\tcertificateSerialNumber: " +
Debug.toHexString(certificateSerialNumber) + "\n";
out += "\tdigestAlgorithmId: " + digestAlgorithmId + "\n";
if (authenticatedAttributes != null) {
out += "\tauthenticatedAttributes: " + authenticatedAttributes +
"\n";
}
out += "\tdigestEncryptionAlgorithmId: " + digestEncryptionAlgorithmId +
"\n";
out += "\tencryptedDigest: " + "\n" +
hexDump.encodeBuffer(encryptedDigest) + "\n";
if (unauthenticatedAttributes != null) {
out += "\tunauthenticatedAttributes: " +
unauthenticatedAttributes + "\n";
}
return out;
}
示例3: toString
import sun.security.util.Debug; //导入方法依赖的package包/类
public String toString() {
return "Sun DSA Public Key\n Parameters:" + algid
+ "\n y:\n" + Debug.toHexString(y) + "\n";
}
示例4: engineToString
import sun.security.util.Debug; //导入方法依赖的package包/类
protected String engineToString() {
return "\n\tp: " + Debug.toHexString(p)
+ "\n\tq: " + Debug.toHexString(q)
+ "\n\tg: " + Debug.toHexString(g)
+ "\n";
}
示例5: toString
import sun.security.util.Debug; //导入方法依赖的package包/类
public String toString() {
return "Sun DSA Private Key \nparameters:" + algid + "\nx: " +
Debug.toHexString(x) + "\n";
}