Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -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.
*/
Expand All @@ -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.
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand Down