Пример #1
0
    public static void Decrypt(byte[] bytes)
    {
        short[]  BitKeys    = new short[] { 6, 2, 8, 0, 6, 8, 9, 1 };
        BitCryto m_bitCryto = new BitCryto(BitKeys);

        for (int i = 0, imax = bytes.Length; i < imax; ++i)
        {
            bytes[i] = m_bitCryto.Decode(bytes[i]);
        }
    }
Пример #2
0
    public static void Decrypt(string inFile, string outFile)
    {
        byte[]   bytes      = File.ReadAllBytes(inFile);
        short[]  BitKeys    = new short[] { 6, 2, 8, 0, 6, 8, 9, 1 };
        BitCryto m_bitCryto = new BitCryto(BitKeys);

        for (int i = 0, imax = bytes.Length; i < imax; ++i)
        {
            bytes[i] = m_bitCryto.Decode(bytes[i]);
        }
        File.WriteAllBytes(outFile, bytes);
    }