Class MobileDigiSignHelper
- java.lang.Object
-
- com._1c.g5.v8.dt.md.mobiledigisign.MobileDigiSignHelper
-
public class MobileDigiSignHelper extends Object
Service for working with mobile client digital signature.
-
-
Constructor Summary
Constructors Constructor Description MobileDigiSignHelper(Version version, Configuration configuration)
Instantiates a new mobile digi sign helper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IBmObject
createDigest(String sign, String publicKey)
Creates the digest.void
generatePrivateKey(String fileName)
Generate private key.String
generateSignature(String fileName)
Generate signature.String
getHash(String publicKey)
Gets the hash.String
getPrivateKey(String fileName)
Gets the private key.String
getPublicKeyByPrivate(String fileName)
Gets the public key by private.boolean
isDigestExpired(AbstractMobileClientSign digest)
Digest has expired.
-
-
-
Constructor Detail
-
MobileDigiSignHelper
public MobileDigiSignHelper(Version version, Configuration configuration)
Instantiates a new mobile digi sign helper.- Parameters:
version
- actualVersion
, cannot benull
configuration
- current configurationConfiguration
, can not benull
-
-
Method Detail
-
generatePrivateKey
public void generatePrivateKey(String fileName) throws IOException
Generate private key.- Parameters:
fileName
- the file name where the private key will be saved- Throws:
IOException
-
getPrivateKey
public String getPrivateKey(String fileName) throws IOException
Gets the private key.- Parameters:
fileName
- the file name with the private key- Returns:
- the private key
- Throws:
IOException
-
getPublicKeyByPrivate
public String getPublicKeyByPrivate(String fileName) throws IOException
Gets the public key by private.- Parameters:
fileName
- the file name with the private key- Returns:
- the public key by private
- Throws:
IOException
-
getHash
public String getHash(String publicKey) throws NoSuchAlgorithmException
Gets the hash.- Parameters:
publicKey
- the public key- Returns:
- the hash
- Throws:
NoSuchAlgorithmException
-
generateSignature
public String generateSignature(String fileName) throws IOException
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
-
-