ARIACipherSuitePlugin.BulkCipherAlgorithmAria.CreateEncryptor C# (CSharp) Method

CreateEncryptor() public method

public CreateEncryptor ( byte rgbKey, byte rgbIV, byte additional ) : ICryptoTransform
rgbKey byte
rgbIV byte
additional byte
return ICryptoTransform
        public override ICryptoTransform CreateEncryptor(byte[] rgbKey, byte[] rgbIV, byte[] additional)
        {
            if (rgbKey == null)
                throw new ArgumentNullException("rgbKey");
            if (rgbKey.Length != _keySize)
                throw new CryptographicException("rgbKey");
            if (rgbIV == null)
                throw new ArgumentNullException("rgbIV");
            if (rgbIV.Length != BlockSize)
                throw new CryptographicException("rgbIV");

            AriaBlockCipher cipher = new AriaBlockCipher(rgbKey);
            return new GenericCbcModeCryptoTransform(cipher, true, rgbIV);
        }