encrypted payment ids are now 64 bit, instead of 256 bit

Pros:
 - smaller on the blockchain
 - shorter integrated addresses

Cons:
 - less sparseness
 - less ability to embed actual information

The boolean argument to encrypt payment ids is now gone from the
RPC calls, since the decision is made based on the length of the
payment id passed.
This commit is contained in:
moneromooo-monero
2015-08-09 10:09:39 +01:00
parent e40cfc4e29
commit a2d7a5fb49
15 changed files with 169 additions and 89 deletions

View File

@@ -46,7 +46,7 @@ namespace cryptonote {
struct integrated_address {
account_public_address adr;
crypto::hash payment_id;
crypto::hash8 payment_id;
BEGIN_SERIALIZE_OBJECT()
FIELD(adr)
@@ -150,7 +150,7 @@ namespace cryptonote {
std::string get_account_integrated_address_as_str(
bool testnet
, account_public_address const & adr
, crypto::hash const & payment_id
, crypto::hash8 const & payment_id
)
{
uint64_t integrated_address_prefix = testnet ?
@@ -176,7 +176,7 @@ namespace cryptonote {
bool get_account_integrated_address_from_str(
account_public_address& adr
, bool& has_payment_id
, crypto::hash& payment_id
, crypto::hash8& payment_id
, bool testnet
, std::string const & str
)
@@ -278,7 +278,7 @@ namespace cryptonote {
)
{
bool has_payment_id;
crypto::hash payment_id;
crypto::hash8 payment_id;
return get_account_integrated_address_from_str(adr, has_payment_id, payment_id, testnet, str);
}