Class KeyUtil
java.lang.Object
org.kopi.ebics.certificate.KeyUtil
Some key utilities
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]getKeyDigest(RSAPublicKey publicKey) Returns the digest value of a given public key.static KeyPairmakeKeyPair(int keyLen) Generates aKeyPairin RSA format.
-
Method Details
-
makeKeyPair
Generates aKeyPairin RSA format.- Parameters:
keyLen- - key size- Returns:
- KeyPair the key pair
- Throws:
NoSuchAlgorithmException
-
getKeyDigest
Returns the digest value of a given public key.In Version “H003” of the EBICS protocol the ES of the financial:
The SHA-256 hash values of the financial institution's public keys for X002 and E002 are composed by concatenating the exponent with a blank character and the modulus in hexadecimal representation (using lower case letters) without leading zero (as to the hexadecimal representation). The resulting string has to be converted into a byte array based on US ASCII code.
- Parameters:
publicKey- the public key- Returns:
- the digest value
- Throws:
EbicsException
-