com.dyadicsec.provider.UnwrapInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of unbound-java-provider Show documentation
Show all versions of unbound-java-provider Show documentation
This is a collection of JAVA libraries that implement Unbound cryptographic classes for JAVA provider, PKCS11 wrapper, cryptoki, and advapi
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); }
}
}