Package org.italiangrid.voms.util

# Class FingerprintHelper

java.lang.Object
org.italiangrid.voms.util.FingerprintHelper

public class FingerprintHelper extends Object
A utility class for computing fingerprints of X.509 certificates.

This class provides methods to generate a cryptographic fingerprint (hash) of an X.509 certificate using a specified digest algorithm.

The default digest algorithm used is SHA-1.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`DEFAULT_DIGEST_ALGORITHM`
The default message digest algorithm used for computing fingerprints.

## Constructor Summary

Constructors
Constructor
Description
`FingerprintHelper()`

## Method Summary

Modifier and Type
Method
Description
`static String`
`getFingerprint(X509Certificate cert)`
Computes the fingerprint of an X.509 certificate using the default digest algorithm.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### DEFAULT_DIGEST_ALGORITHM

public static final String DEFAULT_DIGEST_ALGORITHM
The default message digest algorithm used for computing fingerprints.

See Also:
  - Constant Field Values

## Constructor Details

### FingerprintHelper

public FingerprintHelper()

## Method Details

### getFingerprint

public static String getFingerprint(X509Certificate cert) throws NoSuchAlgorithmException, CertificateEncodingException
Computes the fingerprint of an X.509 certificate using the default digest algorithm.

Parameters:
  `cert` - the X.509 certificate for which to compute the fingerprint
Returns:
  the fingerprint of the certificate as a hexadecimal string
Throws:
  `NoSuchAlgorithmException` - if the specified digest algorithm is not available
  `CertificateEncodingException` - if encoding the certificate fails