Rename PaymentAccountAgeWitness to AccountAgeWitness

This commit is contained in:
Manfred Karrer 2017-09-25 09:15:20 -05:00
parent ea1666a665
commit fb5b8ecc0f
No known key found for this signature in database
GPG key ID: 401250966A6B2C46
4 changed files with 15 additions and 15 deletions

View file

@ -35,7 +35,7 @@ import java.util.concurrent.TimeUnit;
@Slf4j
@EqualsAndHashCode(exclude = {"signaturePubKey"})
@Value
public class PaymentAccountAgeWitness implements LazyProcessedStoragePayload, PersistedStoragePayload {
public class AccountAgeWitness implements LazyProcessedStoragePayload, PersistedStoragePayload {
private final byte[] hash; // 32 bytes
private final byte[] hashOfPubKey; // 32 bytes
@ -52,7 +52,7 @@ public class PaymentAccountAgeWitness implements LazyProcessedStoragePayload, Pe
@Nullable
private Map<String, String> extraDataMap;
public PaymentAccountAgeWitness(byte[] hash,
public AccountAgeWitness(byte[] hash,
byte[] hashOfPubKey,
byte[] signature,
long tradeDate) {
@ -68,7 +68,7 @@ public class PaymentAccountAgeWitness implements LazyProcessedStoragePayload, Pe
// PROTO BUFFER
///////////////////////////////////////////////////////////////////////////////////////////
PaymentAccountAgeWitness(byte[] hash,
AccountAgeWitness(byte[] hash,
byte[] hashOfPubKey,
byte[] signature,
long tradeDate,

View file

@ -62,7 +62,7 @@ public abstract class PaymentAccount implements PersistablePayload {
@Setter
@Nullable
protected PaymentAccountAgeWitness paymentPaymentAccountAgeWitness;
protected AccountAgeWitness paymentAccountAgeWitness;
// TODO add to PB!
@Setter

View file

@ -46,12 +46,12 @@ public class PaymentAccountAgeWitnessService {
this.keyRing = keyRing;
}
public PaymentAccountAgeWitness getPaymentAccountWitness(PaymentAccount paymentAccount, Trade trade) throws CryptoException {
public AccountAgeWitness getPaymentAccountWitness(PaymentAccount paymentAccount, Trade trade) throws CryptoException {
byte[] hash = getWitnessHash(paymentAccount);
byte[] signature = Sig.sign(keyRing.getSignatureKeyPair().getPrivate(), hash);
long tradeDate = trade.getTakeOfferDate().getTime();
byte[] hashOfPubKey = Sha256Hash.hash(keyRing.getPubKeyRing().getSignaturePubKeyBytes());
return new PaymentAccountAgeWitness(hash,
return new AccountAgeWitness(hash,
hashOfPubKey,
signature,
tradeDate);
@ -68,7 +68,7 @@ public class PaymentAccountAgeWitnessService {
}
boolean verifyAgeWitness(byte[] peersAgeWitnessInputData,
PaymentAccountAgeWitness witness,
AccountAgeWitness witness,
byte[] peersSalt,
PublicKey peersPublicKey,
int nonce,

View file

@ -41,7 +41,7 @@ import static org.junit.Assert.assertTrue;
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
@Slf4j
public class PaymentPaymentAccountAgeWitnessServiceTest {
public class PaymentAccountAgeWitnessServiceTest {
private PublicKey publicKey;
private KeyPair keypair;