Skip to content

Instantly share code, notes, and snippets.

@sohamkamani
sohamkamani / rsa.go
Created April 12, 2020 17:31
Example of RSA encryption, decryption, signing, and verification in Go
package main
import (
"crypto"
"crypto/rand"
"crypto/rsa"
"crypto/sha256"
"encoding/base64"
"fmt"
)
package main
import (
"fmt"
"log"
"time"
"github.com/gomodule/redigo/redis"
)
@cicanci
cicanci / main.cpp
Last active July 15, 2024 14:07
Hello World with SDL2
#include <SDL.h>
// Window size
#define WINDOW_WIDTH 640
#define WINDOW_HEIGHT 480
// Image size
#define IMAGE_WIDTH 256
#define IMAGE_HEIGHT 256
@Israel-Miles
Israel-Miles / main.go
Created April 5, 2021 21:11
full blockchain
package main
import (
"crypto/sha256"
"fmt"
"time"
)
type Block struct {
timestamp time.Time