Java API
HSM Dinamo
Loading...
Looking for...
No entries found
Class Reference Dinamo

HSM access API Dinamo. More...

+ Class hierarchy diagram Dinamo:

Public Methods

 Dinamo (byte[] session)
 Defines a previously opened session handle to be used in this instance.
 
 Dinamo ()
 
void openSession (String strAddr, String strUsrId, String strPwd) throws TacException
 Establishes an encrypted connection with the HSM.
 
void openSession (String strAddr, String strUsrId, String strPwd, boolean bLoadBalance) throws TacException
 Establishes an encrypted connection with the HSM.
 
void openSession (String strAddr, String strUsrId, String strPwd, String strOtp, boolean bLoadBalance) throws TacException
 Establishes an encrypted connection with the HSM using OTP.
 
void openSession (String strAddr, String strUsrId, String strPwd, String strOtp) throws TacException
 Establishes an encrypted connection with the HSM using OTP.
 
void openSession (String strAddr, String strUsrId, String strPwd, int nPort, int nFlags) throws TacException
 Establishes an encrypted connection to the HSM using the load balance settings.
 
void openSession (String strAddr, String strUsrId, String strPwd, String strOtp, int nPort, int nFlags) throws TacException
 Establishes an encrypted connection with the HSM using the load balance and OTP configurations.
 
void setOpenSession (byte[] session)
 Defines a previously opened session handle to be used in this instance.
 
void openSession (String strAddr, TacAccessToken stAToken, int nPort, int nFlags) throws TacException
 Establishes an encrypted connection with the HSM using AToken.
 
void openSession (String strAddr, byte[] jbaAToken, int nPort, int nFlags) throws TacException
 Establishes an encrypted connection with the HSM using AToken.
 
void openSession (String strAddr, TacAccessToken stAToken, int nPort, boolean bLoadBalance, boolean bSessionCache, boolean bEncrypted) throws TacException
 Establishes a connection with the HSM using AToken.
 
void openSession (String strAddr, byte[] jbaAToken, int nPort, boolean bLoadBalance, boolean bSessionCache, boolean bEncrypted) throws TacException
 Establishes a connection with the HSM using AToken.
 
void openSession (String strAddr, String strUsrId, String strPwd, int nPort, boolean bLoadBalance, boolean bSessionCache, boolean bEncrypted) throws TacException
 Establishes an encrypted connection with the HSM.
 
void openSession (String strAddr, String strUsrId, String strPwd, String strOtp, int nPort, boolean bLoadBalance, boolean bSessionCache, boolean bEncrypted) throws TacException
 Establishes an encrypted connection with the HSM using OTP.
 
void closeSession (int nFlags) throws TacException
 Terminates the connection to the HSM.
 
void closeSession (boolean bPhysicallyClose) throws TacException
 Terminates the connection to the HSM.
 
void closeSession () throws TacException
 Ends the session by handing back the open connection to the management pool.
 
long getCID () throws TacException
 Retrieves the CID (Correlation ID) of the current session.
 
TacAccessToken issueAToken (long lExpiration) throws TacException
 Issues an Access Token for the user's session in the HSM.
 
void revokeAToken(TacAccessToken accessToken) throws TacException
 Revoke a user's Access Token session in the HSM.
 
TacAccessToken[] listAToken () throws TacException
 Lists the user's Access Tokens in the HSM.
 
int getATokenCounter () throws TacException
 Recovers the Access Token counter for the entire HSM.
 
void runATokenGC () throws TacException
 Runs the Garbage Collector for HSM session tokens.
 
HSMStatInfo getStatInfo () throws TacException
 Retrieves HSM statistics information, such as session, CPU and memory usage figures.
 
HSMAllInfo getHSMInfo () throws TacException
 Retrieves HSM status information.
 
String getHSMStringInfo () throws TacException
 Retrieves HSM status information.
 
String getFirmwareVersion () throws TacException
 Retrieves the HSM firmware version.
 
String getModel () throws TacException
 Recover the HSM model.
 
String getSerialNumber () throws TacException
 Retrieves the HSM's serial number.
 
void deleteUser (String userId) throws TacException
 Remove a User.
 
String[] listUsers () throws TacException
 List HSM users.
 
boolean isExistUser (String user) throws TacException
 Check if the user exists in the HSM.
 
void createUser (String userId, String userPwd, int authMask) throws TacException
 Create a User.
 
void changePassword (String newPassword) throws TacException
 Change the current user's password.
 
void setUserBlockStatus (String user, boolean isBlocked) throws TacException
 Sets a user's lock status.
 
void blockUser (String user) throws TacException
 Block a user.
 
void unblockUser (String user) throws TacException
 Unblocks a user.
 
boolean isUserBlocked (String user) throws TacException
 Checks if the user is blocked.
 
int getUserInvalidLoginAttempts (String user) throws TacException
 Recovers the number of invalid login attempts by a user.
 
HSMCounterInfo getHSMCounterInfo () throws TacException
 Retrieves information from HSM system counters.
 
int getUserACL (String user) throws TacException
 Gets the bitmask of the user's authorizations.
 
void setUserAuthMask (String user, int authMask) throws TacException
 Defines the bitmask of user authorizations.
 
void updateUserObjPermission (String user, boolean create, boolean read, boolean del, boolean update) throws TacException
 Updates the current user's object access authorizations for another user.
 
void updateUserSysPermission (String user, boolean create, boolean list, boolean log, boolean backup, boolean firmware) throws TacException
 Updates a user's system authorizations.
 
void setUserOperator (String user) throws TacException
 Transforms a user into an operator user.
 
void assignUserOATHHotp (String user, byte[] seed) throws TacException
 It associates a HOTP token in the OATH standard with an HSM user for 2-factor authentication.
 
void assignUserOATHHotp (String user, byte[] seed, byte truncationOffset, byte type) throws TacException
 It associates a HOTP token in the OATH standard with an HSM user for 2-factor authentication.
 
void assignUserOATHTotp (String user, byte[] seed, byte truncationOffset, byte type, int timeStep, long t0) throws TacException
 It associates a TOTP token in the OATH standard with an HSM user for 2-factor authentication.
 
void assignUserOATHTotp (String user, byte[] seed) throws TacException
 It associates a TOTP token in the OATH standard with an HSM user for 2-factor authentication.
 
void unassignUserOATH (String user, int param) throws TacException
 Disassociates a TOTP token from an HSM user.
 
void unassignUserOATH (String user) throws TacException
 Disassociates a TOTP token from an HSM user.
 
void resynchUserOATH (String user, String otp1, String otp2, int param) throws TacException
 Resynchronizes an HSM user's HOTP(event) token.
 
void resynchUserOATH (String user, String otp1, String otp2) throws TacException
 Resynchronizes an HSM user's HOTP(event) token.
 
byte[] getUserKey (String strKeyName, int nFlags) throws TacException
 Retrieves the context of a key, as long as the current User has access, stored within the HSM.
 
byte[] getUserKey (String strKeyName) throws TacException
 Retrieves the context of a key, as long as the current User has access, stored within the HSM.
 
byte[] getUserKeyOffline (String strKeyName, int algId, boolean isTemporary, boolean isExportable) throws TacException
 Retrieves the context of a key, without verifying the information passed, as long as the current User has access, stored within the HSM.
 
void deleteKey (String keyId) throws TacException
 Turn off the key.
 
void deleteKeyIfExists (String keyId) throws TacException
 Delete the key if it exists.
 
byte[] createKeyMaterial (int keyAlg) throws TacException
 It creates a new cryptographic key and returns its content without persisting it in the HSM.
 
void createKey (String keyId, int keyAlg, boolean exportable) throws TacException
 It creates and stores a cryptographic key associated with an algorithm according to the parameters entered within the HSM.
 
void createKey (String keyId, int keyAlg) throws TacException
 It creates and stores a cryptographic key associated with an algorithm according to the parameters entered within the HSM.
 
void createKey (String keyId, int keyAlg, int dwFlags) throws TacException
 It creates and stores a cryptographic key associated with an algorithm according to the parameters entered within the HSM.
 
byte[] exportKey (String szKey, int dwBlobType) throws TacException
 Exports an HSM key to the local machine.
 
byte[] exportKey (String szKey, byte[] hKEKey, int dwBlobType) throws TacException
 Exports an HSM key to the local machine.
 
byte[] exportKey (byte[] hKey, byte[] hKEKey, int dwBlobType) throws TacException
 Exports an HSM key to the local machine.
 
void importKey (String szKey, int dwBlobType, int nAlgId, byte[] pbInData, boolean isExportable) throws TacException
 Import a key from the local machine to the HSM.
 
void importKey (String szKey, int dwBlobType, int nAlgId, int dwFlags, byte[] pbInData, int dwInDataLen) throws TacException
 Import a key from the local machine to the HSM.
 
void importKey (String szKey, byte[] hKEKey, int dwBlobType, int nAlgId, int dwFlags, byte[] pbInData, byte[] hKey) throws TacException
 Import a key from the local machine to the HSM.
 
byte[] importKey (String szKey, int dwBlobType, int nAlgId, int dwFlags, byte[] pbInData) throws TacException
 Import a key from the local machine to the HSM.
 
void importKey (String szKey, byte[] hKEKey, int dwBlobType, int nAlgId, int dwFlags, byte[] pbInData, int dwInDataLen, byte[] hKey) throws TacException
 Import a key from the local machine to the HSM.
 
void PKCS12Import (String szPathFile, String szPassword, String szKey, String szCert, boolean isExportable) throws TacException
 Imports a key/certificate from a file in PKCS#12 format into the HSM.
 
void importPKCS12 (String szPathFile, String szPassword, String szKey, String szCert, boolean isExportable) throws TacException
 Imports a key/certificate from a file in PKCS#12 format into the HSM.
 
void importPKCS12 (byte[] pbPkcs12, String szPassword, String szKey, String szCert, boolean isExportable) throws TacException
 Imports a key/certificate from a buffer in PKCS#12 format into the HSM.
 
void importPKCS12 (byte[] pbPkcs12, String szPassword, String szKey, int nKeyAttr, String szCert, String szPubKey, int nReserved) throws TacException
 Imports a key/certificate from a buffer in PKCS#12 format into the HSM.
 
byte[] exportPKCS12 (String password, String key, String cert, String strReserved, int dwFlags) throws TacException
 Exports an HSM key and certificate in PKCS#12 format.
 
byte[] exportPKCS12 (String password, String key, String cert) throws TacException
 Exports an HSM key and certificate in PKCS#12 format.
 
byte[] PKCS8ExportKey (String szKeyId, String szSecret) throws TacException
 Exports an asymmetric key in a file in PKCS#8 format to the HSM.
 
void PKCS8ImportKey (String szKeyId, String szSecret, int dwKeyAlg, byte[] bKeyEnvelope, boolean isExportable) throws TacException
 Imports an asymmetric key from a file in PKCS#8 format into the HSM.
 
int getAlgId (byte[] ctxKey) throws TacException
 Retrieves the key's algorithm.
 
int getAlgId (String keyId) throws TacException
 Retrieves the key's algorithm.
 
byte[] readObject (String szObject) throws TacException
 Exports an HSM object to the local machine.
 
void writeObject (String szObject, byte[] jbObjectData) throws TacException
 Import an object from the local machine to the HSM.
 
byte[] getKeyHandle (String keyId) throws TacException
 Retrieves a key handle.
 
void releaseKeyHandle (byte[] keyHandle) throws TacException
 Releases a key handle.
 
boolean isKeyExportable (byte[] keyHandle) throws TacException
 Check that the key is exportable.
 
boolean isKeyExportable (String keyId) throws TacException
 Check that the key is exportable.
 
void setObjLabel (String objId, String label) throws TacException
 Defines the label attribute of the object's metadata.
 
void createMap (String mapId, String objId1, int objId1Alg, String objId2, int objId2Alg) throws TacException
 Creates a mapping object (MAP) within the HSM.
 
String[] listObjects () throws TacException
 Lists the HSM objects.
 
SVaultGenTokenResponse GenSVaultToken (int op, SVaultGenTokenInfo tokenInfo, int reserved) throws TacException
 It tokenizes a piece of data, generating a token blob and its respective token.
 
SVaultGenTokenResponse GenSVaultToken(SVaultGenTokenInfo tokenInfo ) throws TacException
 It tokenizes a piece of data, generating a token blob and its respective token.
 
SVaultGenTokenResponse GenSVaultDigitToken (byte CKS, byte maskFlags, String MK, String secret) throws TacException
 It tokenizes digits, generating a token blob and its respective token.
 
SVaultGenTokenResponse GenSVaultStringToken (byte maskFlags, String MK, String secret) throws TacException
 It tokenizes a UTF-8 string, generating a token blob and its respective token.
 
String GetSVaultTokenBlobData (int op, String MK, String mask, byte[] tokenBlob) throws TacException
 Retrieves the secret or token of tokenized data using a token blob.
 
String GetSVaultSecret (String MK, String mask, byte[] tokenBlob) throws TacException
 Retrieves the secret of tokenized data using a token blob.
 
String GetSVaultToken (String MK, String mask, byte[] tokenBlob) throws TacException
 Retrieves the token of tokenized data using a token blob.
 
byte[] createHash (int nAlgId, byte[] hKey, int nFlags) throws TacException
 Creates a context for Hash calculation.
 
byte[] createHash (int nAlgId) throws TacException
 Creates a context for calculating the hash.
 
byte[] genEcdhKey (int dwOP, String szPriKey, byte[] pbInData) throws TacException
 It generates a shared secret/key using the ECDH (Elliptc Curve Diffie-Hellman) key-agreement protocol.
 
byte[] genEcdhKeyX963 (int dwOP, String szPriKey, String szTargetKeyName, int dwTargetKeyAlg, int dwTargetKeyAttributes, byte[] pbPubKey, byte[] pbKDFData, int dwFlags) throws TacException
 Generates a shared secret/key using the ANSI X9.63 standard ECDH (Elliptc Curve Diffie-Hellman) key-agreement protocol.
 
byte[] genEcdhKeyX963Sha256 (String szPriKey, String szTargetKeyName, int dwTargetKeyAlg, boolean isExportable, boolean isTemporary, byte[] pbPubKey, byte[] pbKDFData) throws TacException
 Generates a shared secret/key using the key-agreement protocol ECDH (Elliptc Curve Diffie-Hellman) standard ANSI X9.63 SHA256.
 
byte[] getRand (int size) throws TacException
 Generates a pseudo-random buffer, generated in the HSM, for cryptographic use.
 
byte[] encrypt (String strKeyId, byte[] byInput) throws TacException
 Encrypts a data buffer.
 
byte[] encrypt (String strKeyId, byte[] byInput, int flags) throws TacException
 Encrypts a data buffer.
 
byte[] encrypt (String strKeyId, byte[] byInput, byte[] byIV, int dwPadding, int dwMode) throws TacException
 Encrypts data.
 
byte[] encrypt (String strKeyId, byte[] byInput, byte[] byIV, int dwPadding, int dwMode, int flags) throws TacException
 Encrypts data.
 
byte[] decrypt (String keyId, byte[] input) throws TacException
 Decrypts data, often encrypted by the DEncrypt function.
 
byte[] decrypt (String keyId, byte[] input, int flags) throws TacException
 Decrypts data, often encrypted by the DEncrypt function.
 
byte[] decrypt (String keyId, byte[] input, byte[] byIV, int dwPadding, int dwMode) throws TacException
 Decrypts data, often encrypted by the DEncrypt function.
 
byte[] decrypt (String keyId, byte[] input, byte[] byIV, int dwPadding, int dwMode, int flags) throws TacException
 Decrypts data, often encrypted by the DEncrypt function.
 
int verifySignature (String keyId, int algHash, byte[] bSignature, byte[] bMessage) throws TacException
 Check a message.
 
int verifySignature (String keyId, int algHash, int padding, byte[] bSignature, byte[] bMessage) throws TacException
 Check a message.
 
int verifySignature (byte[] hPublicKey, byte[] hHash, byte[] bSignature) throws TacException
 Check a message.
 
int verifySignature (byte[] hPublicKey, int hashAlg, byte[] bSignature, byte[] bMessage) throws TacException
 Check a message.
 
byte[] signHash (String keyId, int algHash, byte[] bMessage) throws TacException
 Signs a piece of data based on its content.
 
byte[] sign (String keyId, int algHash, byte[] bMessage) throws TacException
 Signs a piece of data based on its content.
 
byte[] sign (String keyId, int algHash, int padding, byte[] bMessage) throws TacException
 Signs a piece of data based on its content.
 
byte[] signHashedData (String keyId, int algHash, byte[] bHash) throws TacException
 Signs a piece of data based on its previously computed hash.
 
byte[] signHashedData (String keyId, int algHash, byte[] bHash, boolean useOID) throws TacException
 Signs a piece of data based on its previously computed hash.
 
byte[] signHashedData (String keyId, int algHash, byte[] bHash, int nFlags) throws TacException
 Signs a piece of data based on its previously computed hash.
 
byte[] signHashedData (byte[] privateKeyHandle, int algHash, byte[] bHash, int nFlags) throws TacException
 Signs a piece of data based on its previously computed hash.
 
byte[] generateHash (int algId, int flags, byte[] data) throws TacException
 Generates a hash in just one call.
 
byte[] generateHash (int algId, byte[] data) throws TacException
 Generates a hash in just one call.
 
void initHash (int algId, int flags) throws TacException
 Initializes a piecewise hash operation.
 
void initHash (int algId) throws TacException
 Initializes a piecewise hash operation.
 
void updateHash (byte[] data) throws TacException
 Updates a hash operation with more data.
 
byte[] endHash () throws TacException
 Finalizes a hash operation.
 
byte[] generateMAC (int algId, String macKey, int flags, byte[] data) throws TacException
 Generates a MAC in just one call.
 
byte[] generateMAC (int algId, String macKey, byte[] data) throws TacException
 Generates a MAC in just one call.
 
void initMAC (int algId, String macKey, int flags) throws TacException
 Initializes a MAC operation in parts.
 
void initMAC (int algId, String macKey) throws TacException
 Initializes a MAC operation in parts.
 
void updateMAC (byte[] data) throws TacException
 Updates a MAC operation with more data.
 
byte[] endMAC () throws TacException
 Ends a MAC operation.
 
String generateDUKPT (byte[] baKSI, byte[] baDID_CTR, int dwParam) throws TacException
 It generates a DUKPT key within the HSM using a KSI (Key Serial Identification), a DID (Device ID) and a CTR (Transaction Counter) from the same KSN (Key Serial Number).
 
String generateDUKPTName (byte[] baKSI, byte[] baDID_CTR) throws TacException
 Generates the name of the DUKPT from an entered KSI and CTR.
 
String generateBDKName (byte[] baKSI) throws TacException
 Generates the BDK name from a KSI (Key Serial Identification).
 
byte[] translatePINBlock (String srcPEK, String dstPEK, int transBlockType, String PAN, byte[] inPINBlock) throws TacException
 It translates a PIN block, decrypting it with one key and encrypting it with another.
 
byte[] exportTR31 (String kbpk, String key, int usage, byte mode, byte export) throws TacException
 Exports a key in TR-31 format according to the ASC X9 TR 31-2018 standard.
 
void importTR31 (String kbpk, String key, int keyAttributes, byte[] keyBlock) throws TacException
 Import a key in TR-31 format according to the ASC X9 TR 31-2018 standard.
 
byte[] signPKCS7 (String keyId, String keyCertId, String certs, int attributes, byte[] content) throws TacException
 It generates a signature or co-signature following the PKCS#7 standard (Cryptographic Message Syntax Standard).
 
byte[] signXML (byte bHashMode, int nFlags, String strKeyId, String strCertId, byte[] baUnsignedXml, byte[] baFilter) throws TacException
 Digitally signs an XML document using the W3C XML digital signature standards.
 
byte[] signXML (String strPrivKeyName, int nHashAlg, String strCertId, byte[] baUnsignedXml, byte[] baFilter) throws TacException
 Digitally signs an XML document using the W3C XML digital signature standards.
 
byte[] signXML (byte[] hKey, byte[] hHash, String strCertId, int nUnsignedXml, byte[] baUnsignedXml, int[] naSignedXmlSize, int nFilterSize, byte[] baFilter) throws TacException
 Digitally signs an XML document using the W3C XML digital signature standards.
 
byte[] signPIX (String strKeyId, String strCertId, int nFlags, byte[] baUnsignedPIXEnvelope) throws TacException
 Digitally signs an XML in ISO 20.022 format following the PIX standard defined in the SPI (Instant Payment System).
 
byte[] signPIX (String strKeyId, String strCertId, byte[] baUnsignedPIXEnvelope) throws TacException
 Digitally signs an XML in ISO 20.022 format following the PIX standard defined in the SPI (Instant Payment System).
 
byte[] signPIXDict (String strKeyId, String strCertId, int nFlags, byte[] baUnsignedDictEnvelope) throws TacException
 Digitally signs an XML in XMLDSig format following the DICT standard defined in the SPI (Instant Payment System).
 
byte[] signPIXDict (String strKeyId, String strCertId, byte[] baUnsignedDictEnvelope) throws TacException
 Digitally signs an XML in XMLDSig format following the DICT standard defined in the SPI (Instant Payment System).
 
boolean verifyPIX (String strChainId, String strCRLId, int nFlags, byte[] baSignedPIXEnvelope) throws TacException
 Checks the signature of a digitally signed XML document in ISO 20.022 format following the PIX standard defined in the SPI (Instant Payment System).
 
boolean verifyPIX (String strChainId, String strCRLId, byte[] baSignedPIXEnvelope) throws TacException
 Checks the signature of a digitally signed XML document in ISO 20.022 format following the PIX standard defined in the SPI (Instant Payment System).
 
boolean verifyPIXDict (String strChainId, String strCRLId, int nFlags, byte[] baSignedDictEnvelope) throws TacException
 Checks the signature of a digitally signed XML document in XMLDSig format following the DICT standard defined in the SPI (Instant Payment System).
 
boolean verifyPIXDict (String strChainId, String strCRLId, byte[] baSignedDictEnvelope) throws TacException
 Checks the signature of a digitally signed XML document in XMLDSig format following the DICT standard defined in the SPI (Instant Payment System).
 
byte[] signPIXJWS (String strKeyId, byte[] baHeader, byte[] baPayload) throws TacException
 It makes a JWS RFC 7515 signature following the PIX standard defined in the SPI (Instant Payment System).
 
String signPIXJWS (String strKeyId, String strHeader, String strPayload) throws TacException
 It makes a JWS RFC 7515 signature following the PIX standard defined in the SPI (Instant Payment System).
 
JwsComponents checkPIXJWS (String strChainId, String strCRLId, byte[] baJWS, int nFlags) throws TacException
 Validates an RFC 7515 signed JWS following the PIX standard defined in the SPI (Instant Payment System).
 
JwsComponents checkPIXJWS (String strChainId, String strCRLId, String strJWS, int nFlags) throws TacException
 Validates an RFC 7515 signed JWS following the PIX standard defined in the SPI (Instant Payment System).
 
boolean checkPIXJWS (String strChainId, String strCRLId, byte[] baJWS) throws TacException
 Validates an RFC 7515 signed JWS following the PIX standard defined in the SPI (Instant Payment System).
 
boolean checkPIXJWS (String strChainId, String strCRLId, String strJWS) throws TacException
 Validates an RFC 7515 signed JWS following the PIX standard defined in the SPI (Instant Payment System).
 
PIXResponse postPIX (String strKeyId, String strCertId, String strPIXCertChainId, String strURL, String[] straRequestHeaderList, byte[] baRequestData, int nTimeOut, boolean bUseGzip, boolean bVerifyHostName) throws TacException
 It makes a secure HTTP POST request following the PIX standard defined in SPI (Instant Payment System).
 
PIXResponse postPIX (String strKeyId, String strCertId, String strPIXCertChainId, String strURL, String[] straRequestHeaderList, byte[] baRequestData, int nTimeOut, int nParam) throws TacException
 It makes a secure HTTP POST request following the PIX standard defined in SPI (Instant Payment System).
 
PIXResponse putPIX (String strKeyId, String strCertId, String strPIXCertChainId, String strURL, String[] straRequestHeaderList, byte[] baRequestData, int nTimeOut, boolean bUseGzip, boolean bVerifyHostName) throws TacException
 It makes a secure HTTP PUT request following the PIX standard defined in the SPI (Instant Payment System).
 
PIXResponse putPIX (String strKeyId, String strCertId, String strPIXCertChainId, String strURL, String[] straRequestHeaderList, byte[] baRequestData, int nTimeOut, int nParam) throws TacException
 It makes a secure HTTP PUT request following the PIX standard defined in the SPI (Instant Payment System).
 
PIXResponse getPIX (String strKeyId, String strCertId, String strPIXCertChainId, String strURL, String[] straRequestHeaderList, int nTimeOut, boolean bUseGzip, boolean bVerifyHostName) throws TacException
 It makes a secure HTTP GET request following the PIX standard defined in the SPI (Instant Payment System).
 
PIXResponse getPIX (String strKeyId, String strCertId, String strPIXCertChainId, String strURL, String[] straRequestHeaderList, int nTimeOut, int nParam) throws TacException
 It makes a secure HTTP GET request following the PIX standard defined in the SPI (Instant Payment System).
 
PIXResponse deletePIX (String strKeyId, String strCertId, String strPIXCertChainId, String strURL, String[] straRequestHeaderList, int nTimeOut, boolean bUseGzip, boolean bVerifyHostName) throws TacException
 It makes a secure HTTP DELETE request following the PIX standard defined in SPI (Instant Payment System).
 
PIXResponse deletePIX (String strKeyId, String strCertId, String strPIXCertChainId, String strURL, String[] straRequestHeaderList, int nTimeOut, int nParam) throws TacException
 It makes a secure HTTP DELETE request following the PIX standard defined in SPI (Instant Payment System).
 
PIXHTTPReqDetails getPIXHTTPReqDetails () throws TacException
 Retrieves the details of the last PIX HTTP request (POST, GET...) made in this session.
 
long getPIXHTTPReqCode () throws TacException
 Retrieves the return code of the last PIX HTTP request (POST, GET...) made in this session.
 
byte[] generateOATHHotpBlob (String masterKey) throws TacException
 Generates a blob OATH HOTP(HMAC-based One-Time Password).
 
byte[] generateOATHHotpBlob (String masterKey, byte seedLen) throws TacException
 Generates a blob OATH HOTP(HMAC-based One-Time Password).
 
byte[] generateOATHHotpBlob (String masterKey, byte seedLen, byte truncationOffset) throws TacException
 Generates a blob OATH HOTP(HMAC-based One-Time Password).
 
byte[] importOATHHotpBlob (String masterKey, byte[] seed) throws TacException
 Generates a blob OATH HOTP(HMAC-based One-Time Password).
 
byte[] generateOATHTotpBlob (String masterKey) throws TacException
 Generates a blob OATH TOTP(Time-based One-Time Password).
 
byte[] generateOATHTotpBlob (String masterKey, byte seedLen, byte truncationOffset, int timeStep, long t0) throws TacException
 Generates a blob OATH TOTP(Time-based One-Time Password).
 
byte[] importOATHTotpBlob (String masterKey, byte[] seed, byte truncationOffset, int timeStep, long t0, boolean useDefaultMovingFactor, long movingFactor) throws TacException
 Generates a blob OATH TOTP(Time-based One-Time Password).
 
byte[] importOATHTotpBlob (String masterKey, byte[] seed) throws TacException
 Generates a blob OATH TOTP(Time-based One-Time Password).
 
byte[] getOATHSeed (String masterKey, byte[] blob) throws TacException
 Retrieves the seed from the blob OATH.
 
String getNextOATHOTP (String masterKey, int otpLen, byte[] oathBlob) throws TacException
 Generates the next OTP from the OATH informed blob.
 
byte[] checkOATHBlobOTP (String masterKey, String otp, byte[] oathBlob) throws TacException
 Checks an OTP value for a given blob OATH.
 
byte[] resyncOATHBlobOTP (String masterKey, String otp1, String otp2, byte[] oathBlob) throws TacException
 Re-synchronizes a blob OATH by displaying two continuous OTP values.
 
void SPBActivateCertificate (String szDomain, byte bCA, String szSN) throws TacException
 Activates a certificate that has already been imported into HSM.
 
void SPBActivateCertificate (String szDomain, byte bCA, String szSN, int dwParam) throws TacException
 Activates a certificate that has already been imported into HSM.
 
void SPBSetISPBMap (String strISPB, String strKeyId, String strCertId) throws TacException
 Creates a map with the institution's key and certificate in a slot.
 
byte[] SPBGenerateCSR (String sPrivateKeyName, String sRazaoSocial, String sISPB, String sSISBACEN, int iSequencial, boolean bProducao, String sCidade, String sUF) throws TacException
 Generates a new CSR based on an existing key (RSA 2048).
 
byte[] SPBGenerateCSR (String sPrivateKeyName, String sSubject) throws TacException
 Generates a new CSR based on an existing key (RSA 2048).
 
byte[] generatePKCS10CSR (String szKeyId, String szDN, int dwOutType) throws TacException
 It generates a CSR.
 
void SPBImportCertificate (String szDomain, byte[] bCertificate) throws TacException
 Import a certificate into an HSM namespace.
 
void SPBImportCertificate (String szDomain, byte[] bCertificate, boolean isActive) throws TacException
 Import a certificate into an HSM namespace.
 
void SPBImportCertificate (String szDomain, byte[] bCertificate, boolean isActive, int dwParam) throws TacException
 Import a certificate into an HSM namespace.
 
void SPBImportPKCS12 (String path, String pass, String domain, boolean isActivate, int dwFlags) throws TacException
 Imports a certificate from a PKCS#12 container into the HSM.
 
byte[] SPBGetCertificate (String strIdCertificate) throws TacException
 Retrieves a certificate stored in a namespace in the HSM.
 
byte[] SPBDecode (String szSrcISPB, String szDstISPB, byte[] pbMsgIn, boolean bAcceptExpiredCert, boolean bAutoUpdateCert) throws TacSPBException, IOException
 Decodes a message in the SPB standard, checking signatures, decrypting, but does not check encoding.
 
byte[] SPBDecode (String szSrcISPB, String szDstISPB, byte[] pbMsgIn, boolean bAcceptExpiredCert, boolean bAutoUpdateCert, boolean bEncodingCheck) throws TacSPBException, IOException
 Decrypts a message in the SPB standard, checking signatures and decrypting.
 
byte[] SPBDecode (String szSrcISPB, String szDstISPB, byte[] pbMsgIn, boolean bAcceptExpiredCert, boolean bAutoUpdateCert, boolean bEncodingCheck, int dwFlags) throws TacSPBException, IOException
 Decrypts a message in the SPB standard, checking signatures and decrypting.
 
byte[] SPBDecode (String szSrcISPB, String szDstISPB, byte[] pbMsgIn) throws TacException, IOException
 
byte[] SPBEncode (String szSrcISPB, String szDstISPB, byte[] pbMsgIn, byte bSpecialTreatment) throws TacException
 Encodes a message with the SPB header, signing, encrypting and including all the header fields defined in the RSFN security manual.
 
byte[] SPBEncode (String szSrcISPB, String szDstISPB, byte[] pbMsgIn, byte bSpecialTreatment, int dwFlags) throws TacException
 Encodes a message with the SPB header, signing, encrypting and including all the header fields defined in the RSFN security manual.
 
byte[] bchainSignHash (byte bType, byte bHashMode, byte[] pbHash, String strPk) throws TacException
 Sign a hash using the blockchain module.
 
byte[] bchainGetPubKey (byte bType, String jszId) throws TacException
 Recover a public key from a private key using the blockchain module.
 
void setIv (byte[] hKey, byte[] pbIv) throws TacException
 Sets the key initialization vector.
 
void setMode (byte[] hKey, int dwMode) throws TacException
 Defines the key's operating mode.
 
void setPadding (byte[] hKey, int dwPadding) throws TacException
 Defines the type of padding to be used by the key.
 
void finalize ()
 

Detailed description

HSM access API Dinamo.

Builders and Destructors

Dinamo() [1/2]

Dinamo ( byte[] session)

Defines a previously opened session handle to be used in this instance.

Parameters
sessionPreviously opened session handle

Dinamo() [2/2]

Dinamo ( )

Function documentation

setIv()

void setIv ( byte[] hKey,
byte[] pbIv ) throws TacException

Sets the key initialization vector.

Only valid for symmetric keys.

Parameters
hKeyKey context.
pbIvInitialization vector used with block algorithms according to their symmetric encryption mode of operation.
The size of the initialization vector depends on the symmetric algorithm used, as it has the same length as the operation block. More details in the Observations section.
Exceptions
TacException

setMode()

void setMode ( byte[] hKey,
int dwMode ) throws TacException

Defines the key's operating mode.

Parameters
hKeyKey context.
dwModeIndicates the encryption operating mode of the block algorithm.
Value Meaning
TacNDJavaLib.MODE_ECB Electronic Codebook (ECB)
TacNDJavaLib.MODE_CBC Cipher Block Chain (CBC)
TacNDJavaLib.MODE_GCM Galois/Counter Mode. The authentication tag is located right after the encrypted/decrypted data with the size of (returned size - message size in clear text).
TacNDJavaLib.MODE_KW AESWRAP according to the RFC-3394 standard. Used in encryption and decryption operations of other keys. The padding used is the one defined in the default, any other value will be ignored. Use the standard IV with value 0xA6A6A6A6A6A6A6A60000000000000000.
TacNDJavaLib.MODE_KWP AESWRAP with padding according to the RFC-5649 standard. Used in encryption and decryption operations of other keys. The padding used is the one defined in the default, any other value will be ignored. Use the standard IV with value 0xA65959A6000000000000000000000000.
TacNDJavaLib.MODE_OFB Output-Feedback. Not yet supported.
Valid only for symmetric keys and block algorithms.
Exceptions
TacException

setPadding()

void setPadding ( byte[] hKey,
int dwPadding ) throws TacException

Defines the type of padding to be used by the key.

Parameters
hKeyKey context.
dwPaddingPadding Type
The library can work with the following symmetrical paddings:
Value Meaning
TacNDJavaLib.D_NO_PADDING No padding is done, the data passed for encryption must already have a length that is a multiple of the size of the operation block.
TacNDJavaLib.D_PKCS5_PADDING The padding is done following the standard defined in PKCS#5. It is the default padding if none is defined.
TacNDJavaLib.D_ZERO_PADDING If the length of the data is not a multiple of the size of the operation block, it is completed with trailing zeros until it reaches a size supported by the algorithm. This type of padding should not be used with data where there may be zero-valued bytes, as it may create ambiguity in the decryption operation. If the data only contains ASCII text, for example, there is no problem. Valid only for symmetric keys.
The library can work with the following asymmetric paddings:
Value Meaning
TacNDJavaLib.D_PKCS1_PADDING The padding is done following the standard defined in PKCS#1 v1.5. It is the default padding for RSA keys if none is defined.
TacNDJavaLib.D_PSS_PADDING Padding is done following the PSS standard defined in PKCS#1 EMSA-PSS-ENCODE with the hash equal to that used in the message hash, using the salt with the maximum size available in the block. Option not available for legacy subscriptions.
TacNDJavaLib.D_PSS_SALT_LEN_MD_PADDING Padding is done following the PSS standard defined in PKCS#1 EMSA-PSS-ENCODE with the hash equal to that used in the message hash, using the salt with the same size as the hash output used in the operation. Option not available for legacy subscriptions.
TacNDJavaLib.D_OAEP_SHA1_PADDING The padding is done following the PKCS#1 version 2.1 standard, with the RSAES-OAEP encryption scheme with SHA-1 hash. Option not available for legacy subscriptions.
TacNDJavaLib.D_OAEP_SHA2_256_PADDING The padding is done following the PKCS#1 version 2.1 standard, with the RSAES-OAEP encryption scheme with SHA2-256 hash. Option not available for legacy subscriptions.
TacNDJavaLib.D_X931_PADDING The padding is done following the ANSI X9.31 standard. Option not available for legacy subscriptions.
TacNDJavaLib.D_NO_PADDING No padding is done, the data passed for encryption must already be the length of the operation block size for RSA keys. For RSA only available in legacy operations. For elliptic curve keys, padding is not performed and is available in non-legacy operations. Default option for elliptic curve keys.
Exceptions
TacException

finalize()

void finalize ( )