Click here to Skip to main content
11,479,170 members (52,682 online)
   

C#

 
GeneralRe: Notifyicon in C# website Pin
Pete O'Hanlon28-Jan-13 2:00
protectorPete O'Hanlon28-Jan-13 2:00 
GeneralRe: Notifyicon in C# website Pin
NickyRamshaw28-Jan-13 2:34
memberNickyRamshaw28-Jan-13 2:34 
GeneralRe: Notifyicon in C# website Pin
Pete O'Hanlon28-Jan-13 2:43
protectorPete O'Hanlon28-Jan-13 2:43 
Questionfrom java to c# Pin
superamh27-Jan-13 6:46
membersuperamh27-Jan-13 6:46 
how i can convert this code from java to c#

 public static String Dcipher(String encryptedText1) {
 
        try {
            byte[] desKeyData = {(byte) 0x01, (byte) 0x02, (byte) 0x03,
                                (byte) 0x04, (byte) 0x05, (byte) 0x06,
                                (byte) 0x07, (byte) 0x08};
            DESKeySpec desKeySpec = new DESKeySpec(desKeyData);
            SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
            SecretKey key = null;
            try {
                key = keyFactory.generateSecret(desKeySpec);
            } catch (InvalidKeySpecException ex1) {
            }
            byte[] initVector = new byte[] {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);
 
            byte[] encryptedText = encryptedText1.getBytes();
            byte[] decryptedText = m_decrypter.doFinal(encryptedText);
            return (new String(decryptedText));
 
        } catch (BadPaddingException ex) {
            ex.printStackTrace();
        } catch (IllegalBlockSizeException ex) {
            ex.printStackTrace();
        } catch (InvalidAlgorithmParameterException ex) {
            ex.printStackTrace();
        } catch (InvalidKeyException ex) {
            ex.printStackTrace();
        } catch (NoSuchPaddingException ex) {
            ex.printStackTrace();
        } catch (NoSuchAlgorithmException ex) {
            ex.printStackTrace();
        }
        return "";
    }

AnswerRe: from java to c# Pin
Richard MacCutchan27-Jan-13 7:27
mvpRichard MacCutchan27-Jan-13 7:27 
AnswerRe: from java to c# Pin
Dave Doknjas27-Jan-13 17:37
memberDave Doknjas27-Jan-13 17:37 
QuestionC# timeout on linq to sql Pin
dcof27-Jan-13 3:52
memberdcof27-Jan-13 3:52 
AnswerRe: C# timeout on linq to sql Pin
Dave Kreskowiak27-Jan-13 4:50
mvpDave Kreskowiak27-Jan-13 4:50 
AnswerRe: C# timeout on linq to sql Pin
jschell27-Jan-13 7:10
memberjschell27-Jan-13 7:10 
AnswerRe: C# timeout on linq to sql Pin
V.27-Jan-13 21:41
memberV.27-Jan-13 21:41 

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

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


Advertise | Privacy | Mobile
Web04 | 2.8.150520.1 | Last Updated 23 May 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid