Click here to Skip to main content
15,892,737 members
Home / Discussions / C#
   

C#

 
GeneralRe: Check if polygon is Inside another Pin
gilvani29-Jan-13 4:16
gilvani29-Jan-13 4:16 
GeneralRe: Check if polygon is Inside another Pin
Alan Balkany29-Jan-13 4:22
Alan Balkany29-Jan-13 4:22 
QuestionProblems in retrieving HttpResponse content Pin
tiwal28-Jan-13 4:16
tiwal28-Jan-13 4:16 
AnswerRe: Problems in retrieving HttpResponse content Pin
Richard Deeming28-Jan-13 5:06
mveRichard Deeming28-Jan-13 5:06 
GeneralRe: Problems in retrieving HttpResponse content Pin
tiwal28-Jan-13 23:02
tiwal28-Jan-13 23:02 
QuestionAbout method TextWriter.Write() Pin
taibc27-Jan-13 23:52
taibc27-Jan-13 23:52 
AnswerRe: About method TextWriter.Write() Pin
BobJanova28-Jan-13 0:34
BobJanova28-Jan-13 0:34 
AnswerRe: About method TextWriter.Write() Pin
Richard MacCutchan28-Jan-13 0:37
mveRichard MacCutchan28-Jan-13 0:37 
GeneralRe: About method TextWriter.Write() Pin
PIEBALDconsult28-Jan-13 3:28
mvePIEBALDconsult28-Jan-13 3:28 
AnswerRe: About method TextWriter.Write() Pin
taibc28-Jan-13 14:51
taibc28-Jan-13 14:51 
QuestionNotifyicon in C# website Pin
NickyRamshaw27-Jan-13 21:48
NickyRamshaw27-Jan-13 21:48 
AnswerRe: Notifyicon in C# website Pin
BobJanova28-Jan-13 0:35
BobJanova28-Jan-13 0:35 
GeneralRe: Notifyicon in C# website Pin
NickyRamshaw28-Jan-13 0:52
NickyRamshaw28-Jan-13 0:52 
GeneralRe: Notifyicon in C# website Pin
Pete O'Hanlon28-Jan-13 1:00
mvePete O'Hanlon28-Jan-13 1:00 
GeneralRe: Notifyicon in C# website Pin
NickyRamshaw28-Jan-13 1:34
NickyRamshaw28-Jan-13 1:34 
GeneralRe: Notifyicon in C# website Pin
Pete O'Hanlon28-Jan-13 1:43
mvePete O'Hanlon28-Jan-13 1:43 
Questionfrom java to c# Pin
superamh27-Jan-13 5:46
superamh27-Jan-13 5:46 
AnswerRe: from java to c# Pin
Richard MacCutchan27-Jan-13 6:27
mveRichard MacCutchan27-Jan-13 6:27 
AnswerRe: from java to c# Pin
Dave Doknjas27-Jan-13 16:37
Dave Doknjas27-Jan-13 16:37 
I don't have a conversion for some of the Java types you're using, but the following syntax should be correct:

public static string Dcipher(string encryptedText1)
{
    try
    {
        sbyte[] desKeyData = {(sbyte) 0x01, (sbyte) 0x02, (sbyte) 0x03, (sbyte) 0x04, (sbyte) 0x05, (sbyte) 0x06, (sbyte) 0x07, (sbyte) 0x08};
        DESKeySpec desKeySpec = new DESKeySpec(desKeyData);
        SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
        SecretKey key = null;
        try
        {
            key = keyFactory.generateSecret(desKeySpec);
        }
        catch (InvalidKeySpecException ex1)
        {
        }
        sbyte[] initVector = new sbyte[] {0x10, 0x10, 0x01, 0x04, 0x01, 0x01, 0x01, 0x02};

        AlgorithmParameterSpec algParamSpec = new IvParameterSpec(initVector);
        Cipher m_decrypter = Cipher.getInstance("DES/OFB32/NoPadding");
        m_decrypter.init(Cipher.DECRYPT_MODE, key, algParamSpec);

        sbyte[] encryptedText = encryptedText1.Bytes;
        sbyte[] decryptedText = m_decrypter.doFinal(encryptedText);
        return (new string(decryptedText));

    }
    catch (BadPaddingException ex)
    {
        Console.WriteLine(ex.ToString());
        Console.Write(ex.StackTrace);
    }
    catch (IllegalBlockSizeException ex)
    {
        Console.WriteLine(ex.ToString());
        Console.Write(ex.StackTrace);
    }
    catch (InvalidAlgorithmParameterException ex)
    {
        Console.WriteLine(ex.ToString());
        Console.Write(ex.StackTrace);
    }
    catch (InvalidKeyException ex)
    {
        Console.WriteLine(ex.ToString());
        Console.Write(ex.StackTrace);
    }
    catch (NoSuchPaddingException ex)
    {
        Console.WriteLine(ex.ToString());
        Console.Write(ex.StackTrace);
    }
    catch (NoSuchAlgorithmException ex)
    {
        Console.WriteLine(ex.ToString());
        Console.Write(ex.StackTrace);
    }
    return "";
}


Dave Doknjas
Convert between VB, C#, C++, & Java
www.tangiblesoftwaresolutions.com
Instant C# - VB to C# Converter
Instant VB - C# to VB Converter
QuestionC# timeout on linq to sql Pin
dcof27-Jan-13 2:52
dcof27-Jan-13 2:52 
AnswerRe: C# timeout on linq to sql Pin
Dave Kreskowiak27-Jan-13 3:50
mveDave Kreskowiak27-Jan-13 3:50 
AnswerRe: C# timeout on linq to sql Pin
jschell27-Jan-13 6:10
jschell27-Jan-13 6:10 
AnswerRe: C# timeout on linq to sql Pin
V.27-Jan-13 20:41
professionalV.27-Jan-13 20:41 
Questionactivity-selection algorithm in c# Pin
mazizi026-Jan-13 20:36
mazizi026-Jan-13 20:36 
AnswerRe: activity-selection algorithm in c# Pin
Pete O'Hanlon26-Jan-13 21:16
mvePete O'Hanlon26-Jan-13 21:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.