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);
}
}