public interface SignatureFactory extends BuiltinFactory<Signature>
| Modifier and Type | Field and Description |
|---|---|
static List<String> |
ECC_SIGNATURE_TYPE_PREFERENCES
ECC signature types in ascending order of preference (i.e., most preferred 1st)
|
static List<String> |
RSA_SIGNATURE_TYPE_PREFERENCES
RSA signature types in ascending order of preference (i.e., most preferred 1st)
|
BY_NAME_COMPARATOR, NAME_EXTRACTORFALSE, TRUE| Modifier and Type | Method and Description |
|---|---|
static int |
resolvePreferredSignaturePosition(List<? extends NamedFactory<Signature>> factories,
NamedFactory<Signature> factory) |
static int |
resolvePreferredSignaturePosition(List<String> preferredOrder,
int prefValue,
Map<String,Integer> posMap) |
static List<String> |
resolveSignatureFactoriesProposal(Iterable<String> provided,
Collection<? extends NamedFactory<Signature>> factories) |
static NamedFactory<? extends Signature> |
resolveSignatureFactory(String keyType,
Collection<? extends NamedFactory<? extends Signature>> factories) |
static NamedFactory<Signature> |
resolveSignatureFactoryByPublicKey(PublicKey pubKey,
String algo) |
static List<String> |
resolveSignatureFactoryNamesProposal(Iterable<String> provided,
Collection<String> available) |
setUpFactoriescreate, setUpBuiltinFactories, setUpTransformedFactoriesfindByName, findFirstMatchByName, getName, getNameList, getNames, ofName, removeByName, safeCompareByNameall, any, isSupported, ofstatic final List<String> ECC_SIGNATURE_TYPE_PREFERENCES
static List<String> resolveSignatureFactoriesProposal(Iterable<String> provided, Collection<? extends NamedFactory<Signature>> factories)
provided - The provided signature key typesfactories - The available signature factoriesList of the matching available factories names that are also listed as provided ones
- in the same order of preference as they appear in the available listing. May be empty
if no provided signature key types, or no available ones or no match found.resolveSignatureFactoryNamesProposal(Iterable, Collection)static List<String> resolveSignatureFactoryNamesProposal(Iterable<String> provided, Collection<String> available)
provided - The provided signature key typesavailable - The available signature factories namesList of the matching available factories names that are also listed as provided ones
- in the same order of preference as they appear in the available listing. May be empty
if no provided signature key types, or no available ones or no match found.static int resolvePreferredSignaturePosition(List<? extends NamedFactory<Signature>> factories, NamedFactory<Signature> factory)
static int resolvePreferredSignaturePosition(List<String> preferredOrder, int prefValue, Map<String,Integer> posMap)
static NamedFactory<? extends Signature> resolveSignatureFactory(String keyType, Collection<? extends NamedFactory<? extends Signature>> factories)
static NamedFactory<Signature> resolveSignatureFactoryByPublicKey(PublicKey pubKey, String algo) throws InvalidKeySpecException
pubKey - The intended PublicKey - ignored if nullalgo - The intended signature algorithm - if null/empty and multiple signatures
available for the key type then a default will be used. Otherwise, it is
validated to make sure it matches the public key typeSignature factory or null if no match foundInvalidKeySpecException - If specified algorithm does not match the selected public keyCopyright © 2018–2024 The Apache Software Foundation. All rights reserved.