我一直在尝试使用 Square 的 Redacted 注释从我的自动生成的类中的 toString() 方法中编辑 pin,但没有应用扩展。类加载器似乎没有读取扩展名。
@AutoValue 注释工作正常,但未应用 @Redacted 注释。
package io.*******.********.order.pin.hsm;
import com.google.auto.value.AutoValue;
import io.*****.crypto.model.PinBlockFormat;
@AutoValue
public abstract class GeneratePvvRequest {
/** @return Hexadecimal string representing the encrypted PIN */
@Redacted
public abstract String pinBlock();
/** @return Account number under which the PIN block is currently encrypted */
public abstract String pinBlockAccountNumber();
/** @return Name of the ZPK under which the PIN block is currently encrypted */
public abstract String zpkName();
/** @return Index of the ZPK under which the PIN block is currently encrypted */
public abstract Integer zpkIndex();
/** @return ISO format under which the PIN block is currently encrypted */
public abstract PinBlockFormat pinBlockFormat();
/** @return Account number used to generate the pin's PVV */
public abstract String pvvAccountNumber();
public static GeneratePvvRequest create(
String pinBlock,
String pinBlockAccountNumber,
String zpkName,
Integer zpkIndex,
PinBlockFormat pinBlockFormat,
String pvvAccountNumber) {
return new AutoValue_GeneratePvvRequest(
pinBlock,
pinBlockAccountNumber,
zpkName,
zpkIndex,
pinBlockFormat,
pvvAccountNumber);
}
}