1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-25 22:02:05 +01:00

Deprecate OpenPgpFingerprint.parse() methods

This commit is contained in:
Paul Schaub 2023-04-07 11:47:40 +02:00
parent acb5d3fd9e
commit e744668f5a
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -55,7 +55,9 @@ public abstract class OpenPgpFingerprint implements CharSequence, Comparable<Ope
*
* @param fingerprint fingerprint
* @return parsed fingerprint
* @deprecated Use the parse() methods of the versioned fingerprint subclasses instead.
*/
@Deprecated
public static OpenPgpFingerprint parse(String fingerprint) {
String fp = fingerprint.replace(" ", "").trim().toUpperCase();
if (fp.matches("^[0-9A-F]{40}$")) {
@ -72,7 +74,9 @@ public abstract class OpenPgpFingerprint implements CharSequence, Comparable<Ope
*
* @param binaryFingerprint binary representation of the fingerprint
* @return parsed fingerprint
* @deprecated use the parse() methods of the versioned fingerprint subclasses instead.
*/
@Deprecated
public static OpenPgpFingerprint parseFromBinary(byte[] binaryFingerprint) {
String hex = Hex.toHexString(binaryFingerprint).toUpperCase();
return parse(hex);