This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
export CFLAGS="-Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -flto" | |
export LDFLAGS="-Wl,-s -Wl,-Bsymbolic -Wl,--gc-sections" | |
./configure \ | |
--disable-cookies \ | |
--disable-crypto-auth \ | |
--disable-dict \ | |
--disable-file \ | |
--disable-ftp \ | |
--disable-gopher \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
static void Main(string[] args) { | |
var secretByets = Base32Encoding.ToBytes("supersecretpassword"); | |
var input = GetEpoch() / 30; | |
var hmac = new HMACSHA1(secretByets); | |
var output = hmac.ComputeHash(toBytes(input)); | |
Console.WriteLine("{0:d6}", calculate(output)); |