change genSignKeypair to genNaclSignKeypair or stuff
This commit is contained in:
parent
fea75f7200
commit
e78286cc06
@ -297,7 +297,7 @@ func handleKeyPost(self *dialogNode, form url.Values, conf *configparser.Configu
|
||||
|
||||
func prepareKeyModel(self *dialogNode, err error, conf *configparser.Configuration) templateModel {
|
||||
param := make(map[string]interface{})
|
||||
public, secret := newSignKeypair()
|
||||
public, secret := newNaclSignKeypair()
|
||||
param["dialog"] = &KeyModel{ErrorModel{err}, StepModel{self}, public, secret}
|
||||
return param
|
||||
}
|
||||
|
@ -701,7 +701,7 @@ func (self httpModUI) HandleLogin(wr http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func (self httpModUI) HandleKeyGen(wr http.ResponseWriter, r *http.Request) {
|
||||
pk, sk := newSignKeypair()
|
||||
pk, sk := newNaclSignKeypair()
|
||||
tripcode := makeTripcode(pk)
|
||||
self.writeTemplateParam(wr, r, "keygen.mustache", map[string]interface{}{"public": pk, "secret": sk, "tripcode": tripcode})
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ func reThumbnail(threads int, store ArticleStore, missing bool) {
|
||||
|
||||
// generate a keypair from the command line
|
||||
func KeygenTool() {
|
||||
pub, sec := newSignKeypair()
|
||||
pub, sec := newNaclSignKeypair()
|
||||
log.Println("public key:", pub)
|
||||
log.Println("secret key:", sec)
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ func ValidNewsgroup(newsgroup string) bool {
|
||||
return newsgroupValidFormat(newsgroup)
|
||||
}
|
||||
|
||||
func genKeypair() (pk, sk []byte) {
|
||||
func genNaclKeypair() (pk, sk []byte) {
|
||||
sk = randbytes(32)
|
||||
pk, _ = naclSeedToKeyPair(sk)
|
||||
return
|
||||
@ -304,8 +304,8 @@ func genKeypair() (pk, sk []byte) {
|
||||
|
||||
// generate a new signing keypair
|
||||
// public, secret
|
||||
func newSignKeypair() (string, string) {
|
||||
pk, sk := genKeypair()
|
||||
func newNaclSignKeypair() (string, string) {
|
||||
pk, sk := genNaclKeypair()
|
||||
return hex.EncodeToString(pk), hex.EncodeToString(sk)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user