going somewhere

This commit is contained in:
didier amyot committed 2014-11-09 18:28:08 -08:00
1 parent 6b3c99664c
commit 209af0d820
16 files changed
+549 -131

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
package asymetric
import (
_ "crypto/sha512"
"crypto/rsa"
"github.com/didiercrunch/filou/helper"
)
var random = helper.NewMockRandomReader()
func generateKeyPair() (*rsa.PrivateKey, *rsa.PublicKey) {
if key, err := rsa.GenerateKey(random, 1024); err != nil {
panic(err)
} else {
return key, &key.PublicKey
}
}