Java Code Examples for org.bouncycastle.util.Arrays#clone()

The following examples show how to use org.bouncycastle.util.Arrays#clone() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ChapterIVKmehrResponseWithTimeStampInfo.java    From freehealth-connector with GNU Affero General Public License v3.0 5 votes vote down vote up
public TimeStampResponse getTimeStampResponse() {
   try {
      return new TimeStampResponse(Arrays.clone(this.timeStampBytes));
   } catch (TSPException var2) {
      LOG.error(var2.getClass().getSimpleName() + ":" + var2.getMessage(), var2);
   } catch (IOException var3) {
      LOG.error(var3.getClass().getSimpleName() + ":" + var3.getMessage(), var3);
   }

   return null;
}
 
Example 2
Source File: ChapterIVKmehrResponseWithTimeStampInfo.java    From freehealth-connector with GNU Affero General Public License v3.0 4 votes vote down vote up
public byte[] getTimeStampBytes() {
   return Arrays.clone(this.timeStampBytes);
}
 
Example 3
Source File: ECKeyPair.java    From bop-bitcoin-client with Apache License 2.0 4 votes vote down vote up
@Override
public byte[] getPublic ()
{
	return Arrays.clone (pub);
}
 
Example 4
Source File: InvalidBlobContentConnectorException.java    From freehealth-connector with GNU Affero General Public License v3.0 4 votes vote down vote up
public byte[] getDecompressedBlob() {
   return Arrays.clone(this.decompressedBlob);
}
 
Example 5
Source File: InvalidBlobContentConnectorException.java    From freehealth-connector with GNU Affero General Public License v3.0 4 votes vote down vote up
public InvalidBlobContentConnectorException(InvalidBlobContentConnectorExceptionValues errorCodeValue, byte[] decompressedBlob) {
   super(errorCodeValue.getMessage(), errorCodeValue.getErrorCode());
   this.decompressedBlob = Arrays.clone(decompressedBlob);
}
 
Example 6
Source File: Blob.java    From freehealth-connector with GNU Affero General Public License v3.0 4 votes vote down vote up
public byte[] getHashValue() {
   return Arrays.clone(this.hashValue);
}
 
Example 7
Source File: Blob.java    From freehealth-connector with GNU Affero General Public License v3.0 4 votes vote down vote up
public byte[] getXadesValue() {
   return Arrays.clone(this.xadesValue);
}
 
Example 8
Source File: Blob.java    From freehealth-connector with GNU Affero General Public License v3.0 4 votes vote down vote up
public void setHashValue(byte[] hashValue) {
   this.hashValue = Arrays.clone(hashValue);
}
 
Example 9
Source File: Blob.java    From freehealth-connector with GNU Affero General Public License v3.0 4 votes vote down vote up
public void setContent(byte[] content) {
   this.content = Arrays.clone(content);
}
 
Example 10
Source File: InvalidBlobContentConnectorException.java    From freehealth-connector with GNU Affero General Public License v3.0 4 votes vote down vote up
public InvalidBlobContentConnectorException(InvalidBlobContentConnectorExceptionValues errorCodeValue, Blob blob, byte[] decompressedBlob, Object... params) {
   super(MessageFormat.format(errorCodeValue.getMessage(), params), errorCodeValue.getErrorCode());
   this.blob = blob;
   this.decompressedBlob = Arrays.clone(decompressedBlob);
}
 
Example 11
Source File: Blob.java    From freehealth-connector with GNU Affero General Public License v3.0 4 votes vote down vote up
public byte[] getHashValue() {
   return Arrays.clone(this.hashValue);
}
 
Example 12
Source File: Blob.java    From freehealth-connector with GNU Affero General Public License v3.0 4 votes vote down vote up
public void setHashValue(byte[] hashValue) {
   this.hashValue = Arrays.clone(hashValue);
}
 
Example 13
Source File: InvalidBlobContentConnectorException.java    From freehealth-connector with GNU Affero General Public License v3.0 4 votes vote down vote up
public InvalidBlobContentConnectorException(InvalidBlobContentConnectorExceptionValues errorCodeValue, byte[] decompressedBlob) {
   super(errorCodeValue.getMessage(), errorCodeValue.getErrorCode());
   this.decompressedBlob = Arrays.clone(decompressedBlob);
}
 
Example 14
Source File: Blob.java    From freehealth-connector with GNU Affero General Public License v3.0 4 votes vote down vote up
public byte[] getXadesValue() {
   return Arrays.clone(this.xadesValue);
}
 
Example 15
Source File: InvalidBlobContentConnectorException.java    From freehealth-connector with GNU Affero General Public License v3.0 4 votes vote down vote up
public byte[] getDecompressedBlob() {
   return Arrays.clone(this.decompressedBlob);
}
 
Example 16
Source File: NativeECPublicKey.java    From ECTester with MIT License 4 votes vote down vote up
public ANSIX962(byte[] keyData, ECParameterSpec params) {
    super("EC", "ANSI X9.62", params);
    this.keyData = Arrays.clone(keyData);
}
 
Example 17
Source File: NativeECPublicKey.java    From ECTester with MIT License 4 votes vote down vote up
@Override
public byte[] getEncoded() {
    return Arrays.clone(keyData);
}
 
Example 18
Source File: Document.java    From freehealth-connector with GNU Affero General Public License v3.0 4 votes vote down vote up
public final void setContent(byte[] content) {
   this.content = Arrays.clone(content);
}
 
Example 19
Source File: InvalidBlobContentConnectorException.java    From freehealth-connector with GNU Affero General Public License v3.0 4 votes vote down vote up
public byte[] getDecompressedBlob() {
   return Arrays.clone(this.decompressedBlob);
}
 
Example 20
Source File: Address.java    From bop-bitcoin-client with Apache License 2.0 3 votes vote down vote up
/**
 * Create an address
 * 
 * @param network
 *            - Network PRODUCTION or TEST
 * @param type
 *            - COMMON or P2SH
 * @param address
 *            - digest of key (COMMON) or script (P2SH)
 * @throws ValidationException
 *             - thrown if digest length is not 20 bytes
 */
public Address (Network network, Type type, byte[] address) throws ValidationException
{
	this.network = network;
	this.type = type;
	if ( address.length != 20 )
	{
		throw new ValidationException ("invalid digest length for an address");
	}
	this.bytes = Arrays.clone (address);
}