Skip to content

Commit

Permalink
shows password generation in Example
Browse files Browse the repository at this point in the history
  • Loading branch information
micheal-swiggs committed Mar 6, 2017
1 parent 085e466 commit b0157a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 7 additions & 1 deletion Example.groovy
@@ -1,5 +1,5 @@
@GrabResolver(name='jitpack', root='https://jitpack.io/')
@Grab('com.github.micheal-swiggs:jumblar:v0.2.0')
@Grab('com.github.micheal-swiggs:jumblar:v0.2.1')
@GrabExclude('org.codehaus.groovy:groovy-all')

/**
Expand All @@ -8,6 +8,7 @@
*/
import com.jumblar.core.domain.SimpleJumble;
import com.jumblar.core.controllers.BaseController;
import com.jumblar.core.controllers.PhraseController;

println "Welcome to the Jumblar"

Expand Down Expand Up @@ -39,5 +40,10 @@ String guessCoordinate = "48.858405,2.293577";
SimpleJumble guessJumble = bc.computeHashBase(username, email, personalInfo, password, guessCoordinate);
byte[] guess = guessJumble.getHashBase().getHashBase()

/**
* This will only be true when uploading the first time.
*/
println Arrays.equals(original, guess)

def gmailPassword = PhraseController.generatePhrase(guessJumble.getHashBase(), "myemail@gmail.com", 5)
println "gmail-password: ${gmailPassword}"
2 changes: 0 additions & 2 deletions src/main/java/com/jumblar/core/network/PGPService.groovy
Expand Up @@ -41,14 +41,12 @@ public class PGPService {
return false
}
String keyId = serr.toString().split("\n").find{ it.contains("ultimately")}.split(" ")[2]
println keyId


String sendCmmd = "gpg --keyserver ${keyserverUrl} --send-keys ${keyId}"
Process sendProc = sendCmmd.execute()
sendProc.waitFor()
exitValue = sendProc.exitValue()
println sendProc.text

new File(batchFile).with{ f -> if (f.exists()) f.delete() }
return exitValue == 0
Expand Down

0 comments on commit b0157a7

Please sign in to comment.