aboutsummaryrefslogtreecommitdiffstats
path: root/libraries/spongycastle/pkix/src/main/java/org/spongycastle/cms/CMSConfig.java
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/spongycastle/pkix/src/main/java/org/spongycastle/cms/CMSConfig.java')
-rw-r--r--libraries/spongycastle/pkix/src/main/java/org/spongycastle/cms/CMSConfig.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/libraries/spongycastle/pkix/src/main/java/org/spongycastle/cms/CMSConfig.java b/libraries/spongycastle/pkix/src/main/java/org/spongycastle/cms/CMSConfig.java
new file mode 100644
index 000000000..d53a984ff
--- /dev/null
+++ b/libraries/spongycastle/pkix/src/main/java/org/spongycastle/cms/CMSConfig.java
@@ -0,0 +1,34 @@
+package org.spongycastle.cms;
+
+import org.spongycastle.asn1.ASN1ObjectIdentifier;
+
+public class CMSConfig
+{
+ /**
+ * Set the mapping for the encryption algorithm used in association with a SignedData generation
+ * or interpretation.
+ *
+ * @param oid object identifier to map.
+ * @param algorithmName algorithm name to use.
+ */
+ public static void setSigningEncryptionAlgorithmMapping(String oid, String algorithmName)
+ {
+ ASN1ObjectIdentifier id = new ASN1ObjectIdentifier(oid);
+
+ CMSSignedHelper.INSTANCE.setSigningEncryptionAlgorithmMapping(id, algorithmName);
+ }
+
+ /**
+ * Set the mapping for the digest algorithm to use in conjunction with a SignedData generation
+ * or interpretation.
+ *
+ * @param oid object identifier to map.
+ * @param algorithmName algorithm name to use.
+ */
+ public static void setSigningDigestAlgorithmMapping(String oid, String algorithmName)
+ {
+ ASN1ObjectIdentifier id = new ASN1ObjectIdentifier(oid);
+
+ CMSSignedHelper.INSTANCE.setSigningDigestAlgorithmMapping(id, algorithmName);
+ }
+}