Package org.apache.sshd.openpgp
Class PGPUtils
java.lang.Object
org.apache.sshd.openpgp.PGPUtils
TODO Add javadoc
- Author:
- Apache MINA SSHD Project
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Set<org.c02e.jpgpj.EncryptionAlgorithm> static final Set<org.c02e.jpgpj.CompressionAlgorithm> static final Stringstatic final StringAlias forUnencryptedstatic final StringAlias forUncompressedstatic final StringDefault MIME type for PGP encrypted filesstatic final Stringstatic final String -
Method Summary
Modifier and TypeMethodDescriptionstatic org.c02e.jpgpj.SubkeyfindSubkeyByFingerprint(Collection<? extends org.c02e.jpgpj.Subkey> subKeys, String fingerprint) static org.c02e.jpgpj.SubkeyfindSubkeyByFingerprint(org.c02e.jpgpj.Key key, String fingerprint) static org.c02e.jpgpj.EncryptionAlgorithmfromCipherName(String name) static org.c02e.jpgpj.CompressionAlgorithmfromCompressionName(String name) static Pathstatic NavigableMap<String, org.c02e.jpgpj.Subkey> mapSubKeysByFingerprint(Collection<? extends org.c02e.jpgpj.Subkey> subKeys) static NavigableMap<String, org.c02e.jpgpj.Subkey> mapSubKeysByFingerprint(org.c02e.jpgpj.Key key) static voidsetDefaultPgpFolderPathResolver(Supplier<? extends Path> resolver) Set the reported value fromgetDefaultPgpFolderPath()
-
Field Details
-
DEFAULT_PGP_FILE_SUFFIX
- See Also:
-
STD_LINUX_PGP_FOLDER_NAME
- See Also:
-
STD_WINDOWS_PGP_FOLDER_NAME
- See Also:
-
PGP_ENCRYPTED_FILE
Default MIME type for PGP encrypted files- See Also:
-
NO_CIPHER_PLACEHOLDER
Alias forUnencrypted- See Also:
-
CIPHERS
-
NO_COMPRESSION_PLACEHOLDER
Alias forUncompressed- See Also:
-
COMPRESSIONS
-
-
Method Details
-
fromCipherName
-
fromCompressionName
-
mapSubKeysByFingerprint
public static NavigableMap<String,org.c02e.jpgpj.Subkey> mapSubKeysByFingerprint(org.c02e.jpgpj.Key key) - Parameters:
key- TheKeywhose sub-keys to map - ignored ifnullor no sub-keys available- Returns:
- A
NavigableMapwhere key=the (case insensitive) fingerprint value, value=the matchingSubkey - Throws:
NullPointerException- If key withnullfingerprint encounteredIllegalArgumentException- If key with empty fingerprint encounteredIllegalStateException- If more than one key with same fingerprint found- See Also:
-
mapSubKeysByFingerprint
public static NavigableMap<String,org.c02e.jpgpj.Subkey> mapSubKeysByFingerprint(Collection<? extends org.c02e.jpgpj.Subkey> subKeys) - Parameters:
subKeys- TheSubkey-s to map - ignored ifnull/empty- Returns:
- A
NavigableMapwhere key=the (case insensitive) fingerprint value, value=the matchingSubkey - Throws:
NullPointerException- If key withnullfingerprint encounteredIllegalArgumentException- If key with empty fingerprint encounteredIllegalStateException- If more than one key with same fingerprint found
-
findSubkeyByFingerprint
public static org.c02e.jpgpj.Subkey findSubkeyByFingerprint(org.c02e.jpgpj.Key key, String fingerprint) - Parameters:
key- TheKeywhose sub-keys to scan - ignored ifnullor has no sub-keysfingerprint- The fingerprint to match (case insensitive) - ignored ifnull/empty- Returns:
- The first matching
Subkey-nullif no match found - See Also:
-
findSubkeyByFingerprint
public static org.c02e.jpgpj.Subkey findSubkeyByFingerprint(Collection<? extends org.c02e.jpgpj.Subkey> subKeys, String fingerprint) - Parameters:
subKeys- TheSubkey-s to scan - ignored ifnull/emptyfingerprint- The fingerprint to match (case insensitive) - ignored ifnull/empty- Returns:
- The first matching sub-key -
nullif no match found
-
getDefaultPgpFolderPath
- Returns:
- The default Gnu Privacy Guard folder used to hold key files.
-
setDefaultPgpFolderPathResolver
Set the reported value fromgetDefaultPgpFolderPath()- Parameters:
resolver- ThePathprovider to report - ifnullthen O/S default value will be used
-