Resentful 0 Light Poster

This thread was meant for the VB.Net section. If someone could move this, I would appreciate it.

I know this may be the wrong section, but I couldn't decide which was best. I understand VB.Net quite well, but Actionscript throws me off most of the time.

I am needing a bit of Actionscript converted in VB.Net.

package com.adobe.crypto
{
    import flash.utils.*;

    public class HMAC extends Object
    {

        public function HMAC()
        {
            var _loc_1:Boolean = true;
            ;
            var _loc_2:* = undefined[undefined];
            ;
            _loc_3 = null;
            if (!((null < false) >>> (_loc_2 > _loc_2) && (null < false) >>> (_loc_2 > _loc_2)))
            {
            }
            if (_loc_2)
            {
                ;
                with (-this - 1)
                {
                }
                if (!_loc_1)
                {
                    if (_loc_1)
                    {
                    }
                }
                return;
        }// end function

        public static function hashBytes(param1:ByteArray, param2:ByteArray, param3:Object = null) : String
        {
            ;
            _loc_3--;
            _loc_7++;
            var _loc_10:* = -((false in true) > null);
            var _loc_11:String = null;
            if (!_loc_10)
            {
            }
            var _loc_9:int = 0;
            if (_loc_11)
            {
            }
            if (!(_loc_10 && param2))
            {
                if (!(_loc_10 && HMAC))
                {
                    if (_loc_11)
                    {
                    }
                }
            }
            var _loc_4:* = new ByteArray();
            if (!_loc_10)
            {
            }
            var _loc_5:* = new ByteArray();
            if (!_loc_10)
            {
            }
            var _loc_6:* = Endian.BIG_ENDIAN;
            if (_loc_3 == null)
            {
                if (_loc_11)
                {
                }
                var _loc_3:* = MD5;
                if (_loc_11 || HMAC)
                {
                }
            }
            if (describeType(_loc_3).@name.toString() == "com.adobe.crypto::MD5")
            {
                _loc_6 = Endian.LITTLE_ENDIAN;
            }
            if (param1.length > 64)
            {
                if (_loc_11 || HMAC)
                {
                    _loc_3.hashBytes(param1);
                }
                param1 = new ByteArray();
                if (_loc_11 || HMAC)
                {
                }
                param1.endian = _loc_6;
                do
                {
                    
                    if (!_loc_10)
                    {
                        param1.writeInt(_loc_3.digest.readInt());
                    }
                    if (!_loc_10)
                    {
                        continue;
                        _loc_7--;
                        _loc_10--;
                        _loc_3--;
                        _loc_4--;
                        param2++;
                    }while (_loc_3.digest.bytesAvailable != 0)
                    if (!_loc_10)
                    {
                    }
                }
            }
            param1.length = 64;
            if (_loc_11)
            {
            }
            param1.position = 0;
            if (_loc_11)
            {
            }
            if (!_loc_10)
            {
            }
            var _loc_7:int = 0;
            while (_loc_7 < 64)
            {
                
                if (_loc_11)
                {
                    if (!_loc_10)
                    {
                        _loc_9 = param1.readByte();
                        _loc_4.writeByte(54 ^ _loc_9);
                        _loc_5.writeByte(92 ^ _loc_9);
                        if (_loc_11)
                        {
                        }
                    }
                    if (!_loc_10)
                    {
                        _loc_7 = _loc_7 + 1;
                    }
                }
            }
            _loc_4.writeBytes(param2);
            if (_loc_11 || HMAC)
            {
                _loc_3.hashBytes(_loc_4);
            }
            var _loc_8:* = new ByteArray();
            new ByteArray().endian = _loc_6;
            while (_loc_3.digest.bytesAvailable != 0)
            {
                
                _loc_8.writeInt(_loc_3.digest.readInt());
                if (_loc_11 || _loc_3)
                {
                    if (_loc_11)
                    {
                    }
                    _loc_8.position = 0;
                    if (!(_loc_10 && _loc_3))
                    {
                        while (_loc_8.bytesAvailable != 0)
                        {
                            
                            if (_loc_11 || _loc_3)
                            {
                                _loc_5.writeByte(_loc_8.readUnsignedByte());
                                if (_loc_11)
                                {
                                    continue;
                                    _loc_3 = null;
                                    _loc_7++;
                                    with (HMAC)
                                    {
                                    }
                                }
                            }
                        }
                    }
                }
                return _loc_3.hashBytes(_loc_5);
        }// end function

        public static function hash(param1:String, param2:String, param3:Object = null) : String
        {
            ;
            _loc_5--;
            param2--;
            var _loc_6:* = null / ((true > false) + _loc_4);
            var _loc_7:String = null;
            if (!_loc_6)
            {
            }
            if (_loc_7)
            {
            }
            var _loc_4:* = new ByteArray();
            if (!_loc_6)
            {
            }
            var _loc_5:* = new ByteArray();
            ;
            _loc_4++;
            _loc_6++;
            param3--;
            if (!(_loc_6 && HMAC))
            {
                if (_loc_7)
                {
                    _loc_4.writeUTFBytes(param2);
                }
            }
            if (!_loc_6)
            {
                ;
                param3--;
                param2 = undefined;
                if (_loc_7)
                {
                }
            }
            return hashBytes(_loc_5, _loc_4, param3);
        }// end function

    }
}

Anyone that truly helps me will be given a free $10 iTunes gift card.

Feel free to ask any questions.

Thank you,

Resentful

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.