no.digipost.org.w3.xmldsig.RSAKeyValue Maven / Gradle / Ivy
//
// This file was generated by the Eclipse Implementation of JAXB, v2.3.7
// See https://eclipse-ee4j.github.io/jaxb-ri
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2024.11.06 at 01:54:33 PM UTC
//
package no.digipost.org.w3.xmldsig;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.HashCode2;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
* Java class for RSAKeyValueType complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="RSAKeyValueType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Modulus" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
* <element name="Exponent" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "RSAKeyValueType", propOrder = {
"modulus",
"exponent"
})
@XmlRootElement(name = "RSAKeyValue")
public class RSAKeyValue implements Equals2, HashCode2, ToString2
{
@XmlElement(name = "Modulus", required = true)
protected byte[] modulus;
@XmlElement(name = "Exponent", required = true)
protected byte[] exponent;
/**
* Default no-arg constructor
*
*/
public RSAKeyValue() {
super();
}
/**
* Fully-initialising value constructor
*
*/
public RSAKeyValue(final byte[] modulus, final byte[] exponent) {
this.modulus = modulus;
this.exponent = exponent;
}
/**
* Gets the value of the modulus property.
*
* @return
* possible object is
* byte[]
*/
public byte[] getModulus() {
return modulus;
}
/**
* Sets the value of the modulus property.
*
* @param value
* allowed object is
* byte[]
*/
public void setModulus(byte[] value) {
this.modulus = value;
}
/**
* Gets the value of the exponent property.
*
* @return
* possible object is
* byte[]
*/
public byte[] getExponent() {
return exponent;
}
/**
* Sets the value of the exponent property.
*
* @param value
* allowed object is
* byte[]
*/
public void setExponent(byte[] value) {
this.exponent = value;
}
@Override
public String toString() {
final ToStringStrategy2 strategy = JAXBToStringStrategy.getInstance();
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
@Override
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
@Override
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
{
byte[] theModulus;
theModulus = this.getModulus();
strategy.appendField(locator, this, "modulus", buffer, theModulus, (this.modulus!= null));
}
{
byte[] theExponent;
theExponent = this.getExponent();
strategy.appendField(locator, this, "exponent", buffer, theExponent, (this.exponent!= null));
}
return buffer;
}
@Override
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, java.lang.Object object, EqualsStrategy2 strategy) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
final RSAKeyValue that = ((RSAKeyValue) object);
{
byte[] lhsModulus;
lhsModulus = this.getModulus();
byte[] rhsModulus;
rhsModulus = that.getModulus();
if (!strategy.equals(LocatorUtils.property(thisLocator, "modulus", lhsModulus), LocatorUtils.property(thatLocator, "modulus", rhsModulus), lhsModulus, rhsModulus, (this.modulus!= null), (that.modulus!= null))) {
return false;
}
}
{
byte[] lhsExponent;
lhsExponent = this.getExponent();
byte[] rhsExponent;
rhsExponent = that.getExponent();
if (!strategy.equals(LocatorUtils.property(thisLocator, "exponent", lhsExponent), LocatorUtils.property(thatLocator, "exponent", rhsExponent), lhsExponent, rhsExponent, (this.exponent!= null), (that.exponent!= null))) {
return false;
}
}
return true;
}
@Override
public boolean equals(java.lang.Object object) {
final EqualsStrategy2 strategy = JAXBEqualsStrategy.getInstance();
return equals(null, null, object, strategy);
}
@Override
public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) {
int currentHashCode = 1;
{
byte[] theModulus;
theModulus = this.getModulus();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "modulus", theModulus), currentHashCode, theModulus, (this.modulus!= null));
}
{
byte[] theExponent;
theExponent = this.getExponent();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "exponent", theExponent), currentHashCode, theExponent, (this.exponent!= null));
}
return currentHashCode;
}
@Override
public int hashCode() {
final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.getInstance();
return this.hashCode(null, strategy);
}
public RSAKeyValue withModulus(byte[] value) {
setModulus(value);
return this;
}
public RSAKeyValue withExponent(byte[] value) {
setExponent(value);
return this;
}
}