//
-// System.Security.Cryptography.FromBase64Transform
+// System.Security.Cryptography.FromBase64Transform.cs
//
// Authors:
// Sergey Chaban (serge@wildwestsoftware.com)
namespace System.Security.Cryptography {
[Serializable]
-#if NET_2_0
[ComVisible (true)]
-#endif
public enum FromBase64TransformMode : int {
IgnoreWhiteSpaces,
DoNotIgnoreWhiteSpaces
}
-#if NET_2_0
[ComVisible (true)]
-#endif
public class FromBase64Transform : ICryptoTransform {
private FromBase64TransformMode mode;
{
}
- public FromBase64Transform (FromBase64TransformMode mode)
+ public FromBase64Transform (FromBase64TransformMode whitespaces)
{
- this.mode = mode;
+ this.mode = whitespaces;
accumulator = new byte [4];
accPtr = 0;
m_disposed = false;
Dispose (true);
}
+#if NET_4_0
+ public void Dispose ()
+#else
void IDisposable.Dispose ()
+#endif
{
Dispose (true);
GC.SuppressFinalize (this); // Finalization is now unnecessary
if (Char.IsWhiteSpace ((char)inputBuffer [i]))
ws++;
}
+ // no more (useful) data
+ if (ws == inputCount)
+ return new byte [0];
// there may be whitespace after the terminator
int k = inputOffset + inputCount - 1;
int n = Math.Min (2, inputCount);