diff options
author | Mike Crute <mike@crute.us> | 2021-11-10 22:27:57 -0800 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2021-11-10 22:27:57 -0800 |
commit | 4a1bc8a259a83ff83c6f9d82a387d96569b2d346 (patch) | |
tree | 9ef6ac43e8232c4faed4622896134c5628a825e9 /crypto/ecdsa | |
parent | 8c5b1d33cc3d4af0b7c0e0fc37a90ef80ba25fe5 (diff) | |
download | golib-4a1bc8a259a83ff83c6f9d82a387d96569b2d346.tar.bz2 golib-4a1bc8a259a83ff83c6f9d82a387d96569b2d346.tar.xz golib-4a1bc8a259a83ff83c6f9d82a387d96569b2d346.zip |
Import crypto utilsv0.2.0
Diffstat (limited to 'crypto/ecdsa')
-rw-r--r-- | crypto/ecdsa/ecdsa.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crypto/ecdsa/ecdsa.go b/crypto/ecdsa/ecdsa.go new file mode 100644 index 0000000..3793663 --- /dev/null +++ b/crypto/ecdsa/ecdsa.go | |||
@@ -0,0 +1,11 @@ | |||
1 | package ecdsa | ||
2 | |||
3 | import ( | ||
4 | "crypto/ecdsa" | ||
5 | "crypto/elliptic" | ||
6 | "crypto/rand" | ||
7 | ) | ||
8 | |||
9 | func GenerateECPrivateKey() (*ecdsa.PrivateKey, error) { | ||
10 | return ecdsa.GenerateKey(elliptic.P256(), rand.Reader) | ||
11 | } | ||