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

com.dyadicsec.provider.UnwrapInfo Maven / Gradle / Ivy

Go to download

This is a collection of JAVA libraries that implement Unbound cryptographic classes for JAVA provider, PKCS11 wrapper, cryptoki, and advapi

There is a newer version: 42761
Show newest version
package com.dyadicsec.provider;

import com.dyadicsec.pkcs11.*;

import java.security.KeyStoreException;

/**
 * Created by valery.osheter on 15-Mar-17.
 */
class UnwrapInfo
{
    final CK_MECHANISM mechanism;
    final CKKey pkcs11Key;
    final byte[] wrapped;

    UnwrapInfo(CK_MECHANISM mechanism, CKKey pkcs11Key, byte[] wrapped)
    {
        this.mechanism = mechanism;
        this.pkcs11Key = pkcs11Key;
        this.wrapped = wrapped;
    }

     T unwrap(Class c, CK_ATTRIBUTE[] t) throws KeyStoreException
    {
        try { return pkcs11Key.unwrap(c, mechanism, wrapped, t); }
        catch (CKException e) { throw new KeyStoreException(e); }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy