Package sonia.scm.security
Interface GPG
public interface GPG
Allows signing and verification using gpg.
- Since:
- 2.4.0
-
Method Summary
Modifier and TypeMethodDescriptionfindPublicKey(String id) Returns the public key with the given id or an empty optional.findPublicKeyId(byte[] signature) Returns the id of the key from the given signature.findPublicKeysByUsername(String username) Returns all public keys assigned to the given usernameReturns the default private key of the currently authenticated user.
-
Method Details
-
findPublicKeyId
Returns the id of the key from the given signature.- Parameters:
signature- signature- Returns:
- public key id
-
findPublicKey
Returns the public key with the given id or an empty optional.- Parameters:
id- id of public- Returns:
- public key or empty optional
-
findPublicKeysByUsername
Returns all public keys assigned to the given username- Parameters:
username- username of the public key owner- Returns:
- collection of public keys
-
getPrivateKey
PrivateKey getPrivateKey()Returns the default private key of the currently authenticated user.- Returns:
- default private key
-