forked from I2P_Developers/i2p.i2p
add b64 hash
This commit is contained in:
@@ -170,6 +170,15 @@ public class AddressBean
|
||||
return Base32.encode(hash) + ".b32.i2p";
|
||||
}
|
||||
|
||||
/** @since 0.9 */
|
||||
public String getB64()
|
||||
{
|
||||
byte[] dest = Base64.decode(destination);
|
||||
if (dest == null)
|
||||
return "";
|
||||
return I2PAppContext.getGlobalContext().sha().calculateHash(dest).toBase64();
|
||||
}
|
||||
|
||||
/** @since 0.8.7 */
|
||||
public void setProperties(Properties p) {
|
||||
props = p;
|
||||
|
||||
@@ -94,6 +94,9 @@
|
||||
<td><%=intl._("Base 32 Address")%></td>
|
||||
<td><a href="http://<%=b32%>/"><%=b32%></a></td>
|
||||
</tr><tr class="list${book.trClass}">
|
||||
<td><%=intl._("Base 64 Hash")%></td>
|
||||
<td><%=addr.getB64()%></td>
|
||||
</tr><tr class="list${book.trClass}">
|
||||
<td><%=intl._("Address Helper")%></td>
|
||||
<td><a href="http://<%=addr.getName()%>/?i2paddresshelper=<%=addr.getDestination()%>"><%=intl._("link")%></a></td>
|
||||
</tr><tr class="list${book.trClass}">
|
||||
|
||||
Reference in New Issue
Block a user