What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2021-11-19 15:10:17
golang ssh server and lets encrypt auto
package main import ( "crypto/tls" "fmt" "net/http" "golang.org/x/crypto/acme/autocert" ) func main() { mux := http.NewServeMux() mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {... Add solution -
C# 2021-11-18 17:16:08
c# md5 int
int source = 123; String hash; // Do not omit "using" - should be disposed using (var md5 = System.Security.Cryptography.MD5.Create()) { hash = String.Concat(md5.ComputeHash(BitConverter .GetBytes(source)) .Select(x => x.ToString("x... Add solution -
Other 2021-11-18 02:02:08
crypto miner
Salad uses your PC to mine crypto while you are AFK, they automatically mine the most profitable coin your machine can handle, increasing your overall return. You keep 100% of the profits earned through mining and pay a small fee when you purchase an it... Add solution -
Javascript 2021-11-18 01:58:12
square webhook validate signature
// The crypto module provides cryptographic functionality const crypto = require('crypto'); // const body = JSON.stringify(req.body); // const signature = req.header('x-square-signature'); function isValidSignature(body, url, signature) { // Concatena... Add solution -
Other 2021-11-13 00:48:11
dart base64 encode
It requires a few steps, but encoding a string in base64 is pretty straightforward. Dart has a function in the package:crypto library, CryptoUtils.bytesToBase64, which takes a list of bytes to encode as base64. In order to get the list of bytes from a Da... Add solution -
Python 2021-11-12 22:22:11
how to generate prime numbers in a bit range python
def miller_rabin(n, k): # Implementation uses the Miller-Rabin Primality Test # The optimal number of rounds for this test is 40 # See http://stackoverflow.com/questions/6325576/how-many-iterations-of-rabin-miller-should-i-use-for-cryptograph... Add solution -
Javascript 2021-11-12 17:43:19
nodejs encrypt text with key
const crypto = require('crypto'); const algorithm = 'aes-256-ctr'; const secretKey = 'vOVH6sdmpNWjRRIqCc7rdxs01lwHzfr3'; const iv = crypto.randomBytes(16); const encrypt = (text) => { const cipher = crypto.createCipheriv(algorithm, secretKey, iv... Add solution
Best helpers
Ranking is empty