going somewhere
This commit is contained in:
1 parent
6b3c99664c
commit
209af0d820
16 files changed
+549
-131
No files matched your search
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user