public BaseChanger Xor(BaseChanger key) { byte[] baseBytes, keyBytes, xoredBytes; baseBytes = _baseInput.ToBytes(); keyBytes = key.ToBytes(); xoredBytes = ByteByByteXor(baseBytes, keyBytes); return(new BaseChanger(xoredBytes)); }
public static string XorEqualHexes(string hexInput, string hexKey) { BaseChanger inputBaseChanger = new BaseChanger(hexInput, StringType.Hex); BaseChanger keyBaseChanger = new BaseChanger(hexKey, StringType.Hex); BaseChanger xoredBaseChanger; HeXor hexxor = new HeXor(inputBaseChanger); xoredBaseChanger = hexxor.Xor(keyBaseChanger); return(xoredBaseChanger.ToHex()); }
public static string HexToBase64(string hexInput) { BaseChanger bChanger = new BaseChanger(hexInput, StringType.Hex); return(bChanger.ToBase64()); }
public BaseChanger(BaseChanger anotherBaseChanger) { _byteInput = anotherBaseChanger.ToBytes(); }
public HeXor(BaseChanger baseInput) { _baseInput = baseInput; }