3 Commits

Author SHA1 Message Date
idk
0a2d58418f Merge pull request #1 from eyedeekay/desthash44
add 44-char dest hashes
2019-12-07 22:31:43 +00:00
idk
ca1a4f7f54 update deb changelog 2019-12-07 17:31:04 -05:00
idk
6406efd277 add 44-char dest hashes 2019-12-07 17:26:28 -05:00
4 changed files with 21 additions and 13 deletions

View File

@@ -1,8 +1,10 @@
USER_GH=eyedeekay
VERSION=0.0.2
VERSION=0.32.1
echo:
@echo "type make version to do release $(VERSION)"
version:
gothub delete -s $(GITHUB_TOKEN) -u $(USER_GH) -r sam3 -t v$(VERSION) 2> /dev/null; true
gothub release -s $(GITHUB_TOKEN) -u $(USER_GH) -r sam3 -t v$(VERSION) -d "version $(VERSION)"

14
debian/changelog vendored
View File

@@ -1,13 +1,11 @@
<<<<<<< HEAD
golang-github-eyedeekay-sam3 (0.3.2.5) bionic; urgency=medium
golang-github-eyedeekay-sam3 (0.3.2.1) bionic; urgency=medium
[ idk ]
* Updates to SAMv3.2
* Move i2pkeys to own directory/library
* Bug fixes
* Add support for 44-character destination hashes.
-- idk <hankhill19580@gmail.com> Sat, 7 Dec 2019 17:30:30 -0500
-- idk <hankhill19580@gmail.com> Thu, 28 Feb 2019 21:40:35 -0500
=======
golang-github-eyedeekay-sam3 (0.3.2.01) bionic; urgency=medium
[ idk ]
@@ -23,8 +21,6 @@ golang-github-eyedeekay-sam3 (0.3.2.0) bionic; urgency=medium
-- idk <hankhill19580@gmail.com> Sat, 18 May 2019 18:32:51 -0500
>>>>>>> stable
golang-github-eyedeekay-sam3 (0.0~git20190223.af5a3f3) bionic; urgency=medium
[ idk ]

View File

@@ -80,13 +80,23 @@ func DestHashFromString(str string) (dhash I2PDestHash, err error) {
return
}
// get string representation of i2p dest hash
// get string representation of i2p dest hash(base32 version)
func (h I2PDestHash) String() string {
b32addr := make([]byte, 56)
i2pB32enc.Encode(b32addr, h[:])
return string(b32addr[:52]) + ".b32.i2p"
}
// get base64 representation of i2p dest sha256 hash(the 44-character one)
func (h I2PDestHash) Hash() string {
hash := sha256.New()
hash.Write(h[:])
digest := hash.Sum(nil)
buf := make([]byte, 44)
i2pB64enc.Encode(buf, digest)
return string(buf)
}
// Returns "I2P"
func (h *I2PDestHash) Network() string {
return "I2P"

View File

@@ -44,7 +44,7 @@ func Test_StreamingDial(t *testing.T) {
t.Fail()
return
}
fmt.Println("\tDialing i2p-projekt.i2p(", forumAddr.Base32(), ")")
fmt.Println("\tDialing i2p-projekt.i2p(", forumAddr.Base32(), forumAddr.DestHash().Hash(), ")")
conn, err := ss.DialI2P(forumAddr)
if err != nil {
fmt.Println(err.Error())