Golang crypto/x509.PublicKeyAlgorithm type example
package crypto/x509
Golang crypto/x509.PublicKeyAlgorithm type usage example
switch {
case x509Cert.PublicKeyAlgorithm == x509.DSA:
return "DSA Algorithm"
case x509Cert.PublicKeyAlgorithm == x509.RSA:
return "RSA Algorithm"
case x509Cert.PublicKeyAlgorithm == x509.ECDSA:
return "ECDSA Algorithm"
default:
return "UnknownPublicKeyAlgorithm"
}
Reference :
Advertisement
Something interesting
Tutorials
+12.7k Golang : zlib compress file example
+9.5k Golang : Accessing content anonymously with Tor
+9.5k Mac OSX : Get a process/daemon status information
+10.6k Golang : Resolve domain name to IP4 and IP6 addresses.
+10.1k Golang : Print how to use flag for your application example
+7.7k Golang : Error reading timestamp with GORM or SQL driver
+11.5k Use systeminfo to find out installed Windows Hotfix(s) or updates
+6k Golang : Compound interest over time example
+7.4k Golang : Individual and total number of words counter example
+16.9k Golang : Set up source IP address before making HTTP request
+5.6k Golang : Frobnicate or tweaking a string example
+18.2k Golang : Get path name to current directory or folder