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

com.uid2.shared.attest.AttestationTokenDecryptor Maven / Gradle / Ivy

package com.uid2.shared.attest;

import com.uid2.shared.Const;

import javax.crypto.Cipher;
import java.security.PrivateKey;

public class AttestationTokenDecryptor {
    public byte[] decrypt(byte[] payload, PrivateKey privateKey) throws Exception {
        Cipher cipher = Cipher.getInstance(Const.Name.AsymetricEncryptionCipherClass);
        cipher.init(Cipher.DECRYPT_MODE, privateKey);
        return cipher.doFinal(payload);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy