summary refs log tree commit diff
path: root/crypto/src/asn1/crmf/PKMacValue.cs
diff options
context:
space:
mode:
authorOren Novotny <oren@novotny.org>2014-08-26 17:35:17 -0400
committerOren Novotny <oren@novotny.org>2014-08-26 17:35:17 -0400
commit5f9336106a1b51241336520b2cd032340d12fd81 (patch)
tree58be4e085640a1286b715886f7717f81cde898e6 /crypto/src/asn1/crmf/PKMacValue.cs
parentRelease 1.7.0.1 with Wpa81 support (diff)
downloadBouncyCastle.NET-ed25519-5f9336106a1b51241336520b2cd032340d12fd81.tar.xz
rename Crypto dir to crypto to match bc-git
Diffstat (limited to 'crypto/src/asn1/crmf/PKMacValue.cs')
-rw-r--r--crypto/src/asn1/crmf/PKMacValue.cs89
1 files changed, 0 insertions, 89 deletions
diff --git a/crypto/src/asn1/crmf/PKMacValue.cs b/crypto/src/asn1/crmf/PKMacValue.cs
deleted file mode 100644
index 20a08fd1d..000000000
--- a/crypto/src/asn1/crmf/PKMacValue.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-using System;
-
-using Org.BouncyCastle.Asn1.Cmp;
-using Org.BouncyCastle.Asn1.X509;
-
-namespace Org.BouncyCastle.Asn1.Crmf
-{
-    /**
-     * Password-based MAC value for use with POPOSigningKeyInput.
-     */
-    public class PKMacValue
-        : Asn1Encodable
-    {
-        private readonly AlgorithmIdentifier  algID;
-        private readonly DerBitString         macValue;
-
-        private PKMacValue(Asn1Sequence seq)
-        {
-            this.algID = AlgorithmIdentifier.GetInstance(seq[0]);
-            this.macValue = DerBitString.GetInstance(seq[1]);
-        }
-
-        public static PKMacValue GetInstance(object obj)
-        {
-            if (obj is PKMacValue)
-                return (PKMacValue)obj;
-
-            if (obj is Asn1Sequence)
-                return new PKMacValue((Asn1Sequence)obj);
-
-            throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj");
-        }
-
-        public static PKMacValue GetInstance(Asn1TaggedObject obj, bool isExplicit)
-        {
-            return GetInstance(Asn1Sequence.GetInstance(obj, isExplicit));
-        }
-
-        /**
-         * Creates a new PKMACValue.
-         * @param params parameters for password-based MAC
-         * @param value MAC of the DER-encoded SubjectPublicKeyInfo
-         */
-        public PKMacValue(
-            PbmParameter pbmParams,
-            DerBitString macValue)
-            : this(new AlgorithmIdentifier(CmpObjectIdentifiers.passwordBasedMac, pbmParams), macValue)
-        {
-        }
-
-        /**
-         * Creates a new PKMACValue.
-         * @param aid CMPObjectIdentifiers.passwordBasedMAC, with PBMParameter
-         * @param value MAC of the DER-encoded SubjectPublicKeyInfo
-         */
-        public PKMacValue(
-            AlgorithmIdentifier algID,
-            DerBitString        macValue)
-        {
-            this.algID = algID;
-            this.macValue = macValue;
-        }
-
-        public virtual AlgorithmIdentifier AlgID
-        {
-            get { return algID; }
-        }
-
-        public virtual DerBitString MacValue
-        {
-            get { return macValue; }
-        }
-
-        /**
-         * <pre>
-         * PKMACValue ::= SEQUENCE {
-         *      algId  AlgorithmIdentifier,
-         *      -- algorithm value shall be PasswordBasedMac 1.2.840.113533.7.66.13
-         *      -- parameter value is PBMParameter
-         *      value  BIT STRING }
-         * </pre>
-         * @return a basic ASN.1 object representation.
-         */
-        public override Asn1Object ToAsn1Object()
-        {
-            return new DerSequence(algID, macValue);
-        }
-    }
-}