public KeyRep(Type type,
String algorithm,
String format,
byte[] encoded) {
if (type == null || algorithm == null ||
format == null || encoded == null) {
throw new NullPointerException("invalid null input(s)");
}
this.type = type;
this.algorithm = algorithm;
this.format = format.toUpperCase();
this.encoded = encoded.clone();
}
Construct the alternate Key class.
Parameters:
type - either one of Type.SECRET, Type.PUBLIC, or Type.PRIVATE
algorithm - the algorithm returned from
Key.getAlgorithm()
format - the encoding format returned from
Key.getFormat()
encoded - the encoded bytes returned from
Key.getEncoded()
Throws:
NullPointerException -
if type is null ,
if algorithm is null ,
if format is null ,
or if encoded is null
- exception:
NullPointerException -
if type is null ,
if algorithm is null ,
if format is null ,
or if encoded is null
|