/**
* Signs the supplied address bytes with the {@link IdentityKeyPair}'s private key and returns a proto that includes it, and it's signature.
*/
- public static PaymentAddress signPaymentsAddress(
- byte[] publicAddressBytes, ECPrivateKey privateKey
- ) {
+ public static PaymentAddress signPaymentsAddress(byte[] publicAddressBytes, ECPrivateKey privateKey) {
byte[] signature = privateKey.calculateSignature(publicAddressBytes);
return new PaymentAddress.Builder().mobileCoinAddress(new PaymentAddress.MobileCoinAddress.Builder().address(
* <p>
* Returns the validated bytes if so, otherwise returns null.
*/
- public static byte[] verifyPaymentsAddress(
- PaymentAddress paymentAddress, ECPublicKey publicKey
- ) {
+ public static byte[] verifyPaymentsAddress(PaymentAddress paymentAddress, ECPublicKey publicKey) {
final var mobileCoinAddress = paymentAddress.mobileCoinAddress;
if (mobileCoinAddress == null || mobileCoinAddress.address == null || mobileCoinAddress.signature == null) {
logger.debug("Got payment address without mobile coin address, ignoring.");