mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8256363: Define toString() for MGF1ParameterSpec
Reviewed-by: mullan
This commit is contained in:
parent
eab170c0af
commit
486d6f631b
3 changed files with 15 additions and 11 deletions
|
@ -25,8 +25,6 @@
|
|||
|
||||
package java.security.spec;
|
||||
|
||||
import java.security.spec.AlgorithmParameterSpec;
|
||||
|
||||
/**
|
||||
* This class specifies the set of parameters used with mask generation
|
||||
* function MGF1 in OAEP Padding and RSASSA-PSS signature scheme, as
|
||||
|
@ -162,4 +160,9 @@ public class MGF1ParameterSpec implements AlgorithmParameterSpec {
|
|||
public String getDigestAlgorithm() {
|
||||
return mdName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MGF1ParameterSpec[hashAlgorithm=" + mdName + "]";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2020, Oracle and/or its affiliates. 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
|
||||
|
@ -220,11 +220,12 @@ public class PSSParameterSpec implements AlgorithmParameterSpec {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("MD: " + mdName + "\n")
|
||||
.append("MGF: " + mgfSpec + "\n")
|
||||
.append("SaltLength: " + saltLen + "\n")
|
||||
.append("TrailerField: " + trailerField + "\n");
|
||||
StringBuilder sb = new StringBuilder("PSSParameterSpec[");
|
||||
sb.append("hashAlgorithm=" + mdName + ", ")
|
||||
.append("maskGenAlgorithm=" + mgfSpec + ", ")
|
||||
.append("saltLength=" + saltLen + ", ")
|
||||
.append("trailerField=" + trailerField)
|
||||
.append(']');
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue