Package org.opensaml.xmlsec.signature.impl

# Class CryptoBinaryImpl

java.lang.Object
org.opensaml.core.xml.AbstractXMLObject
org.opensaml.core.xml.schema.impl.XSBase64BinaryImpl
org.opensaml.xmlsec.signature.impl.CryptoBinaryImpl

All Implemented Interfaces:
  `XSBase64Binary`, `XMLObject`, `CryptoBinary`

Direct Known Subclasses:
  `ECPointTypeImpl`, `ExponentImpl`, `GeneratorImpl`, `GImpl`, `JImpl`, `ModulusImpl`, `PgenCounterImpl`, `PgenCounterImpl`, `PImpl`, `PImpl`, `PublicImpl`, `QImpl`, `QImpl`, `SeedImpl`, `SeedImpl`, `YImpl`

public class CryptoBinaryImpl extends XSBase64BinaryImpl implements CryptoBinary
Concrete implementation of `CryptoBinary`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private BigInteger`
`bigIntValue`
The cached BigInteger representation of the element's base64-encoded value.
`private final org.slf4j.Logger`
`log`
Class logger.

### Fields inherited from interface org.opensaml.xmlsec.signature.CryptoBinary

`TYPE_LOCAL_NAME, TYPE_NAME`

### Fields inherited from interface org.opensaml.core.xml.schema.XSBase64Binary

`TYPE_LOCAL_NAME, TYPE_NAME`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`CryptoBinaryImpl(String namespaceURI, String elementLocalName, String namespacePrefix)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`BigInteger`
`getValueBigInt()`
Convenience method to get the value of the element as a BigInteger type.
`void`
`setValue(String newValue)`
Sets the base64-encoded binary value.
`void`
`setValueBigInt(BigInteger bigInt)`
Convenience method to set the value of the element as a BigInteger type.

### Methods inherited from class org.opensaml.core.xml.schema.impl.XSBase64BinaryImpl

`getOrderedChildren, getValue`

### Methods inherited from class org.opensaml.core.xml.AbstractXMLObject

`detach, ensureDOM, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getObjectMetadata, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, manageQualifiedAttributeNamespace, prepareAttributeValueForAssignment, prepareElementContentForAssignment, prepareForAssignment, prepareForAssignment, prepareForAssignment, registerOwnID, releaseChildrenDOM, releaseDOM, releaseParentDOM, releaseThisAndChildrenDOM, releaseThisandParentDOM, resolveID, resolveIDFromRoot, setDOM, setElementNamespacePrefix, setElementQName, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation, setSchemaType`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.opensaml.core.xml.XMLObject

`detach, ensureDOM, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getObjectMetadata, getOrderedChildren, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, releaseChildrenDOM, releaseDOM, releaseParentDOM, resolveID, resolveIDFromRoot, setDOM, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation`

### Methods inherited from interface org.opensaml.core.xml.schema.XSBase64Binary

`getValue`

## Field Details

### log

@Nonnull private final org.slf4j.Logger log
Class logger.

### bigIntValue

@Nullable private BigInteger bigIntValue
The cached BigInteger representation of the element's base64-encoded value.

## Constructor Details

### CryptoBinaryImpl

protected CryptoBinaryImpl(@Nullable String namespaceURI, @Nonnull String elementLocalName, @Nullable String namespacePrefix)
Constructor.

Parameters:
  `namespaceURI` - the namespace the element is in
  `elementLocalName` - the local name of the XML element this Object represents
  `namespacePrefix` - the prefix for the given namespace

## Method Details

### getValueBigInt

@Nullable public BigInteger getValueBigInt()
Convenience method to get the value of the element as a BigInteger type.

Specified by:
  `getValueBigInt` in interface `CryptoBinary`
Returns:
  the BigInteger representation of the element's content

### setValueBigInt

public void setValueBigInt(@Nullable BigInteger bigInt) throws EncodingException
Convenience method to set the value of the element as a BigInteger type.

Specified by:
  `setValueBigInt` in interface `CryptoBinary`
Parameters:
  `bigInt` - the new BigInteger representation of the element's content
Throws:
  `EncodingException` - if the byte value of the BigInteger can not be base64 encoded.

### setValue

public void setValue(@Nullable String newValue)
Sets the base64-encoded binary value.

Specified by:
  `setValue` in interface `XSBase64Binary`
Overrides:
  `setValue` in class `XSBase64BinaryImpl`
Parameters:
  `newValue` - the string value