Class MobileDigiSignHelper
java.lang.Object
com._1c.g5.v8.dt.md.mobiledigisign.MobileDigiSignHelper
Service for working with mobile client digital signature.
-
Constructor Summary
ConstructorsConstructorDescriptionMobileDigiSignHelper
(Version version, Configuration configuration) Instantiates a new mobile digi sign helper. -
Method Summary
Modifier and TypeMethodDescriptioncreateDigest
(String sign, String publicKey) Creates the digest.void
generatePrivateKey
(String fileName) Generate private key.generateSignature
(String fileName) Generate signature.Gets the hash.getPrivateKey
(String fileName) Gets the private key.getPublicKeyByPrivate
(String fileName) Gets the public key by private.boolean
Digest has expired.
-
Constructor Details
-
MobileDigiSignHelper
Instantiates a new mobile digi sign helper.- Parameters:
version
- actualVersion
, cannot benull
configuration
- current configurationConfiguration
, can not benull
-
-
Method Details
-
generatePrivateKey
Generate private key.- Parameters:
fileName
- the file name where the private key will be saved- Throws:
IOException
-
getPrivateKey
Gets the private key.- Parameters:
fileName
- the file name with the private key- Returns:
- the private key
- Throws:
IOException
-
getPublicKeyByPrivate
Gets the public key by private.- Parameters:
fileName
- the file name with the private key- Returns:
- the public key by private
- Throws:
IOException
-
getHash
Gets the hash.- Parameters:
publicKey
- the public key- Returns:
- the hash
- Throws:
NoSuchAlgorithmException
-
generateSignature
Generate signature.- Parameters:
fileName
- the file name with the private key- Returns:
- the string
- Throws:
IOException
-
isDigestExpired
public boolean isDigestExpired(AbstractMobileClientSign digest) throws MobileClientDigestTypesException Digest has expired.- Parameters:
digest
- the digest- Returns:
- true, if successful
- Throws:
MobileClientDigestTypesException
-
createDigest
Creates the digest.- Parameters:
sign
- the signpublicKey
- the public key- Returns:
IBmObject
the digest
-