summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-09-04 19:49:26 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-09-04 19:49:26 +0200
commitacb7a82e95556748afbc61bb8eb1d5d98a2c98c6 (patch)
tree7f33c43d0d5e7a64fa619ab0cb1c11aa9d9acae3
parent6e1c21c6c4062918b303fedf610322ea2968392e (diff)
Print as hex
-rw-r--r--main.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.go b/main.go
index dac211b..84cb2a7 100644
--- a/main.go
+++ b/main.go
@@ -71,7 +71,7 @@ func factor(N *big.Int) (*big.Int, *big.Int) {
for {
select {
case <-t.C:
- fmt.Println(p, q)
+ fmt.Printf("%x %x\n", p, q)
default:
switch m.Mul(p, q).Cmp(N) {
case -1: // m < N, go up
@@ -108,5 +108,6 @@ func main() {
if err != nil {
log.Fatal(err)
}
- fmt.Println(factor(pub.N))
+ p, q := factor(pub.N)
+ fmt.Printf("%x %x\n", p, q)
}