Archived
1
0

change genSignKeypair to genNaclSignKeypair or stuff

This commit is contained in:
Jeff Becker 2017-08-25 10:56:17 -04:00
parent fea75f7200
commit e78286cc06
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
4 changed files with 6 additions and 6 deletions

View File

@ -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
}

View File

@ -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})
}

View File

@ -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)
}

View File

@ -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)
}