public byte[] DecodeEBC(byte[] bloks) { ExpandData(ref bloks); var result = new List <byte>(); for (int i = 0; i < bloks.Length; i += _algorithm.Size()) { result.AddRange(_algorithm.DecodeBlok(bloks.Skip(i).Take(_algorithm.Size()).ToArray())); } original_text = result; return(result.ToArray()); }
public byte[] Decode(byte[] bloks) { var m = new List <byte>(); for (int i = 0; i < bloks.Length; i += _algorithm.Size) { m.AddRange(_algorithm.DecodeBlok(bloks.Skip(i).Take(_algorithm.Size).ToArray())); } return(m.ToArray()); }
public byte[] Decode(byte[] code) { var c = (byte[])code.Clone(); var m = new List <byte>(); byte[] prev = _c0; for (int i = 0; i < code.Length; i += _algorithm.Size) { m.AddRange(_algorithm.DecodeBlok(prev)); for (int j = 0; j < _algorithm.Size; j++) { m[i + j] ^= c[i + j]; } prev = c.Skip(i).Take(_algorithm.Size).ToArray(); } return(m.ToArray()); }