public class PKCS11OAEPParameterSpec extends PKCS11Spec implements java.security.spec.AlgorithmParameterSpec
tokenManager_, USE_PUBLIC_ROLE, USE_PUBLIC_SESSION, USE_READ_ONLY_SESSION, USE_READ_WRITE_SESSION, USE_SO_ROLE, USE_USER_ROLE, USE_USER_SESSION, usePin_, useRole_, useROSession_
Constructor and Description |
---|
PKCS11OAEPParameterSpec()
default constructor using SHA1 for the mgf1 function and to hash the data.
|
PKCS11OAEPParameterSpec(iaik.pkcs.pkcs11.Mechanism hashAlgorithm,
long mgfHashAlgorithm,
long oaepSourceType,
byte[] oaepSourceData)
Constructor to set the given hash algorithms and source type.
|
Modifier and Type | Method and Description |
---|---|
iaik.pkcs.pkcs11.Mechanism |
getHashAlgorithm()
the mechanism for the hash algorithm used for data hashing
|
long |
getMgfHashAlgorithm()
the hash algorithm used by the mask generation function
|
byte[] |
getOaepSourceData()
Returns the OAEP source data
|
long |
getOaepSourceType()
Returns the OAEP source type.
|
void |
setHashAlgorithm(iaik.pkcs.pkcs11.Mechanism hashAlgorithm)
set the mechanism for the hash algorithm used for data hashing, e.g.
|
void |
setMgfHashAlgorithm(long mgfHashAlgorithm)
set the hash algorithm to be used by the mask generation function, e.g.
|
void |
setOaepSourceData(byte[] oaepSourceData)
Set the OAEP source data
|
void |
setOaepSourceType(long oaepSourceType)
Sets the OAEP source type, typically RSAPkcsOaepParameters.SourceType.DATA_SPECIFIED.
|
getPin, getRole, getTokenManager, isUseAnonymousRole, isUseROSession, isUseRwSession, isUseSORole, isUseUserRole, isUseUserSession, setPin, setRole, setTokenManager, setUseAnonymousRole, setUseSORole, setUseUserRole
public PKCS11OAEPParameterSpec()
public PKCS11OAEPParameterSpec(iaik.pkcs.pkcs11.Mechanism hashAlgorithm, long mgfHashAlgorithm, long oaepSourceType, byte[] oaepSourceData) throws java.lang.IllegalArgumentException
hashAlgorithm
- hash algorithm for data hashing, e.g. PKCS11Constants.CKM_SHA_1mgfHashAlgorithm
- hash algorithm used by the mask generation function mgf1, e.g.
MessageGenerationFunctionType.SHA1oaepSourceType
- OAEP source type, typically RSAPkcsOaepParameters.SourceType.DATA_SPECIFIEDoaepSourceData
- OAEP source data, typically nulljava.lang.IllegalArgumentException
public iaik.pkcs.pkcs11.Mechanism getHashAlgorithm()
public void setHashAlgorithm(iaik.pkcs.pkcs11.Mechanism hashAlgorithm)
hashAlgorithm
- the hash algorithm that shall be used for data hashingpublic long getMgfHashAlgorithm()
public void setMgfHashAlgorithm(long mgfHashAlgorithm)
mgfHashAlgorithm
- the mgf1 hash algorithmpublic long getOaepSourceType()
public void setOaepSourceType(long oaepSourceType)
oaepSourceType
- the OAEP source typepublic byte[] getOaepSourceData()
public void setOaepSourceData(byte[] oaepSourceData)
oaepSourceData
- the source dataIAIK JavaSecurity Website https://jce.iaik.tugraz.at/
IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2023 IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved. Version 1.9.4