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

com.uid2.attestation.aws.NitroAttestation Maven / Gradle / Ivy

The newest version!
package com.uid2.attestation.aws;

public class NitroAttestation {
    
    public static NitroAttestationRequest generateAttestationRequest(NitroAttestationParams params) throws NitroException {
        byte[] buffer = new byte[20000];
        int result = generateAttestationRequestInternal(
            params.userData, 
            params.publicKey, 
            params.nonce, 
            buffer);
        
        if(result > 0) {
            return new NitroAttestationRequest(buffer, result);
        } else {
            throw NitroException.fromErrorCode(result);
        }
    }

    static {
        System.loadLibrary("jnsm");
    }

    private static native int generateAttestationRequestInternal(
        byte[] userData,
        byte[] publicKey,
        byte[] nonce,
        byte[] buffer);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy