Skip to content

Instantly share code, notes, and snippets.

View hobo0cn's full-sized avatar
:octocat:
Digital world is the future.

hobo0cn

:octocat:
Digital world is the future.
View GitHub Profile
@ppLorins
ppLorins / bidi-server-cus.cc
Created July 18, 2019 07:22
an example for the bidirectional streaming async grpc c++ server.
/*
*
* Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
@bradleypeabody
bradleypeabody / ecdsa-more-curves.go
Created August 2, 2016 16:52
Example of supporting additional elliptic curves for ECDSA to sign and verify with different key sizes. (Example uses curves with bit sizes smaller than P224 to achieve shorter signatures. Signatures are compatible with standard stuff like OpenSSL.)
package main
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/sha256"
"crypto/x509"
"crypto/x509/pkix"
"encoding/asn1"