Skip to content

Instantly share code, notes, and snippets.

View OlivierKobialka's full-sized avatar

OlivierKobialka

View GitHub Profile
@OlivierKobialka
OlivierKobialka / main.py
Created June 26, 2024 16:41
Rail Fence Cipher | Python
import tkinter as tk
def encrypt(value: str, depth: int) -> str:
# Create a 2D list to represent the rail fence pattern
rail = [['\n' for _ in range(len(value))] for _ in range(depth)]
direction = False
row, col = 0, 0
@OlivierKobialka
OlivierKobialka / Voting.sol
Last active May 20, 2024 18:45
Voting dApp | Foundry
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.21;
import {VotingInterface} from "./VotingInterface.sol";
///////////////
// Errors //
///////////////
error Voting__InvalidChoiceIndex(uint256 choiceIndex);
import * as crypto from "crypto";
export function keyPair(): { publicKey: string; privateKey: string } {
const a: bigint = 0n;
const b: bigint = 7n;
const p: bigint = 2n ** 256n - 2n ** 32n - 977n;
const n: bigint =
115792089237316195423570985008687907852837564279074904382605163141518161494337n;
const g = {
@OlivierKobialka
OlivierKobialka / regex.md
Created December 25, 2023 12:44
Private and Public Key Regex