Don't leak PrivateKeyStringResource private keys via toString()

This commit is contained in:
Adar Dembo
2011-06-22 17:17:57 -07:00
committed by Philip Langdale
parent dc70f08e45
commit 4be02450dd

View File

@@ -29,4 +29,11 @@ public class PrivateKeyStringResource extends Resource<String> {
public Reader getReader() throws IOException { public Reader getReader() throws IOException {
return new StringReader(getDetail()); return new StringReader(getDetail());
} }
@Override
public String toString() {
// If not overridden, the superclass's will return the private key as
// part of the string.
return "[" + getClass().getSimpleName() + "]";
}
} }