All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.tokenscript.attestation.AttestedObjectDecoder Maven / Gradle / Ivy

package org.tokenscript.attestation;

import java.io.IOException;
import org.bouncycastle.crypto.params.AsymmetricKeyParameter;
import org.tokenscript.attestation.core.Attestable;

public class AttestedObjectDecoder implements ObjectDecoder> {
  private ObjectDecoder underlyingDecoder;
  private AsymmetricKeyParameter publicAttestationSigningKey;

  public AttestedObjectDecoder(ObjectDecoder underlyingObjectDecoder, AsymmetricKeyParameter publicAttestationSigningKey) {
    this.underlyingDecoder = underlyingObjectDecoder;
    this.publicAttestationSigningKey = publicAttestationSigningKey;
  }

  @Override
  public AttestedObject decode(byte[] encoding) throws IOException {
    return new AttestedObject(encoding, underlyingDecoder, publicAttestationSigningKey);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy