Skip to content

Instantly share code, notes, and snippets.

@avalko
avalko / gist:5d28b8871afb20c43655674379990347
Last active October 4, 2019 11:23
example-bt4-template.html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<style>
@avalko
avalko / Salsa20.cs
Created October 1, 2017 10:08
Salsa20
/*
* This implementation of Salsa20 is ported from the reference implementation
* by D. J. Bernstein, which can be found at:
* http://cr.yp.to/snuffle/salsa20/ref/salsa20.c
*
* This work is hereby released into the Public Domain. To view a copy of the public domain dedication,
* visit http://creativecommons.org/licenses/publicdomain/ or send a letter to
* Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
*/
@avalko
avalko / ChaCha20.cs
Created October 1, 2017 10:06
ChaCha20
using System;
using System.Text;
namespace ChaCha20Cipher {
public sealed class ChaCha20Cipher : IDisposable {
/// <summary>
/// The ChaCha20 state (aka "context")
/// </summary>
private uint[] state;
@avalko
avalko / Scanf.cs
Last active September 24, 2017 18:50
Scanf (analog) writen in C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
namespace MonitoringAgent
{
class Scanf
{