X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2Fcorlib%2FSystem.Security.Cryptography%2FICryptoTransform.cs;h=dda99d8b81bce2bbea00862ff8a563b9bba18e0f;hb=4eb352bcb3ef7a71dc9ab62c5cd2d5e7598619f7;hp=f3d1f0e0df88d686134330aa2533e384942a9bb0;hpb=baa39453fc9572621c3b036f94a73732a88025ec;p=mono.git diff --git a/mcs/class/corlib/System.Security.Cryptography/ICryptoTransform.cs b/mcs/class/corlib/System.Security.Cryptography/ICryptoTransform.cs index f3d1f0e0df8..dda99d8b81b 100644 --- a/mcs/class/corlib/System.Security.Cryptography/ICryptoTransform.cs +++ b/mcs/class/corlib/System.Security.Cryptography/ICryptoTransform.cs @@ -1,49 +1,59 @@ -// -// System.Security.Cryptography ICryptoTransform interface -// -// Authors: -// Matthew S. Ford (Matthew.S.Ford@Rose-Hulman.Edu) -// -// Copyright 2001 by Matthew S. Ford. -// - - -using System.Security.Cryptography; - -namespace System.Security.Cryptography { - - /// - /// Crytographic functions that can process a stream of bytes implement this interface. - /// This works by stringing together one or more ICryptoTransform classes with a stream. - /// Data is passed from one to the next without the need of outside buffering/intervention. - /// - public interface ICryptoTransform { - - /// - /// Whether the function can transform multiple blocks at a time. - /// - bool CanTransformMultipleBlocks {get;} - - /// - /// Size of input blocks for the function. - /// - int InputBlockSize {get;} - - /// - /// Size of the output blocks of the function. - /// - int OutputBlockSize {get;} - - /// - /// FIXME: Process some data. A block at a time? Less than a block at a time? - /// - int TransformBlock (byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset); - - /// - /// Processes the final part of the data. Also finalizes the function if needed. - /// - byte[] TransformFinalBlock (byte[] inputBuffer, int inputOffset, int inputCount); - - } -} - +// +// System.Security.Cryptography ICryptoTransform interface +// +// Authors: +// Matthew S. Ford (Matthew.S.Ford@Rose-Hulman.Edu) +// +// Copyright 2001 by Matthew S. Ford. +// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com) +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +using System.Runtime.InteropServices; + +namespace System.Security.Cryptography { + +#if NET_2_0 + [ComVisible (true)] +#endif + public interface ICryptoTransform : IDisposable { + + bool CanReuseTransform { + get; + } + + bool CanTransformMultipleBlocks { + get; + } + + int InputBlockSize { + get; + } + + int OutputBlockSize { + get; + } + + int TransformBlock (byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset); + + byte[] TransformFinalBlock (byte[] inputBuffer, int inputOffset, int inputCount); + } +}