diff --git a/sdk/digitalb2bclient/src/main/java/io/github/ptsat/digitalb2bclient/crypto/CryptoKey.java b/sdk/digitalb2bclient/src/main/java/io/github/ptsat/digitalb2bclient/crypto/CryptoKey.java index d994300..e5df978 100644 --- a/sdk/digitalb2bclient/src/main/java/io/github/ptsat/digitalb2bclient/crypto/CryptoKey.java +++ b/sdk/digitalb2bclient/src/main/java/io/github/ptsat/digitalb2bclient/crypto/CryptoKey.java @@ -25,7 +25,7 @@ public class CryptoKey { public static final String RSA_ALGORITHM = "RSA"; /** - * This method to be used to get public key from pem file + * This method is to be used to get public key from pem file * * @param filePath is the name of the pem file that contains the public key, * @return PublicKey is the result PublicKey object. @@ -36,7 +36,7 @@ public static PublicKey getPublicKeyPemFile(String filePath) throws Exception { } /** - * This method to be used to get private key from pem file + * This method is to be used to get private key from pem file * * @param filePath is the name of the pem file that contains the private key, * @return PrivateKey is the result PrivateKey object. @@ -47,7 +47,7 @@ public static PrivateKey getPrivateKeyPemFile(String filePath) throws Exception } /** - * This method to be used to get public key from string + * This method is to be used to get public key from string * * @param publicKey is a string containing the public key, * @return PublicKey is the result PublicKey object. @@ -72,7 +72,7 @@ public static PublicKey getPublicKey(String publicKey) throws Exception { } /** - * This method to be used to get private key from string + * This method is to be used to get private key from string * * @param privateKey is a string containing the private key, * @return PrivateKey is the result PrivateKey object. @@ -101,7 +101,7 @@ public static PrivateKey getPrivateKey(String privateKey) throws Exception { } /** - * This method to be used to get public key from private key + * This method is to be used to get public key from private key * * @param privateKey is a string containing the private key, * @return PublicKey is the result PublicKey object. @@ -121,7 +121,7 @@ public static PublicKey getPublicKeyFromPrivateKey(PrivateKey privateKey) throws } /** - * This method to be used to get content from file + * This method is to be used to get content from file * * @param fileName is the name of the file that we will get its content, * @return String is the contents of the file. diff --git a/sdk/digitalb2bclient/src/main/java/io/github/ptsat/digitalb2bclient/crypto/encryption/Encryption.java b/sdk/digitalb2bclient/src/main/java/io/github/ptsat/digitalb2bclient/crypto/encryption/Encryption.java index b586c6d..f963fcf 100644 --- a/sdk/digitalb2bclient/src/main/java/io/github/ptsat/digitalb2bclient/crypto/encryption/Encryption.java +++ b/sdk/digitalb2bclient/src/main/java/io/github/ptsat/digitalb2bclient/crypto/encryption/Encryption.java @@ -57,7 +57,7 @@ public Encryption build() { } /** - * This method to be used to encrypt key + * This method is to be used to encrypt key * @param key is the key which will be encrypted, * @return String is the result of encrypted key. */ @@ -79,7 +79,7 @@ public String encryptKey(String key) { } /** - * This method to be used to decrypt Key + * This method is to be used to decrypt Key * @param key is the key which will be decrypted, * @return String is the result of decrypted key. */ @@ -102,7 +102,7 @@ public String decryptKey(String key) { } /** - * This method to be used to encrypt payload + * This method is to be used to encrypt payload * @param payload is the payload which will be encrypted, * @param key which will be used to encrypt the payload, * @return String is the result of encrypted payload. @@ -134,8 +134,8 @@ public String encryptPayload(String payload, String key) { } /** - * This method to be used to decrypt payload - * @param payload is the payload which will be decrypt, + * This method is to be used to decrypt payload + * @param payload is the payload which will be decrypted, * @param key which will be used to decrypt the payload, * @return String is the result of decrypted payload. */ @@ -164,9 +164,9 @@ public String decryptPayload(String payload, String key) { } /** - * This method to be used to encrypt payload and key - * @param payload is the payload which will be encrypt, - * @param key is the key which will be encrypt, + * This method is to be used to encrypt payload and key + * @param payload is the payload which will be encrypted, + * @param key is the key which will be encrypted, * @return CryptoResponse is the result of encrypted payload and key. */ public CryptoResponse encrypt(String payload, String key) { @@ -178,9 +178,9 @@ public CryptoResponse encrypt(String payload, String key) { } /** - * This method to be used to decrypt payload and key - * @param payload is the payload which will be decrypt, - * @param key is the key which will be decrypt, + * This method is to be used to decrypt payload and key + * @param payload is the payload which will be decrypted, + * @param key is the key which will be decrypted, * @return CryptoResponse is the result of decrypted payload and key. */ public CryptoResponse decrypt(String payload, String key) { diff --git a/sdk/digitalb2bclient/src/main/java/io/github/ptsat/digitalb2bclient/crypto/signature/impl/DigitalSignatureCorePKCS.java b/sdk/digitalb2bclient/src/main/java/io/github/ptsat/digitalb2bclient/crypto/signature/impl/DigitalSignatureCorePKCS.java index cbf90ba..07b68c2 100644 --- a/sdk/digitalb2bclient/src/main/java/io/github/ptsat/digitalb2bclient/crypto/signature/impl/DigitalSignatureCorePKCS.java +++ b/sdk/digitalb2bclient/src/main/java/io/github/ptsat/digitalb2bclient/crypto/signature/impl/DigitalSignatureCorePKCS.java @@ -28,7 +28,7 @@ public DigitalSignatureCorePKCS() { * * @param privateKey is the private key that we will use to sign, * @param data is the data that we will sign using the private key, - * @return string This return of the signature. + * @return string This returns the signature. */ public String Sign(PrivateKey privateKey, String data) throws Exception { try { @@ -48,7 +48,7 @@ public String Sign(PrivateKey privateKey, String data) throws Exception { } /** - * This method to be used to verify of a signature + * This method is to be used to verify a signature * * @param publicKey is the public key that we will use to verify, * @param signature is a signature that we will verify, diff --git a/sdk/digitalb2bclient/src/main/java/io/github/ptsat/digitalb2bclient/crypto/signature/impl/DigitalSignatureCorePSS.java b/sdk/digitalb2bclient/src/main/java/io/github/ptsat/digitalb2bclient/crypto/signature/impl/DigitalSignatureCorePSS.java index d5fe6df..dea3bd4 100644 --- a/sdk/digitalb2bclient/src/main/java/io/github/ptsat/digitalb2bclient/crypto/signature/impl/DigitalSignatureCorePSS.java +++ b/sdk/digitalb2bclient/src/main/java/io/github/ptsat/digitalb2bclient/crypto/signature/impl/DigitalSignatureCorePSS.java @@ -29,7 +29,7 @@ public DigitalSignatureCorePSS() { * * @param privateKey is the private key that we will use to sign, * @param data is the data that we will sign using the private key, - * @return string This return of the signature. + * @return string This returns the signature. */ public String Sign(PrivateKey privateKey, String data) throws Exception { @@ -59,7 +59,7 @@ public String Sign(PrivateKey privateKey, String data) throws Exception { } /** - * This method to be used to verify of a signature + * This method is to be used to verify a signature * * @param publicKey is the public key that we will use to verify, * @param signature is a signature that we will verify, @@ -90,7 +90,7 @@ public boolean Verify(PublicKey publicKey, String signature, String msg) throws } /** - * This method to be used to calculate PSS Salt Length based on public key + * This method is to be used to calculate PSS Salt Length based on public key * * @param publicKey is the public key that we will use to get modulus, * @return Integer is the result of PSS Salt Length Auto.