MCPcopy Create free account
hub / github.com/TheAlgorithms/Java / RSA

Method RSA

src/main/java/com/thealgorithms/ciphers/RSA.java:40–42  ·  view source on GitHub ↗

Constructor that generates RSA keys with the specified number of bits. @param bits The bit length of the keys to be generated. Common sizes include 512, 1024, 2048, etc.

(int bits)

Source from the content-addressed store, hash-verified

38 * @param bits The bit length of the keys to be generated. Common sizes include 512, 1024, 2048, etc.
39 */
40 public RSA(int bits) {
41 generateKeys(bits);
42 }
43
44 /**
45 * Encrypts a text message using the RSA public key.

Callers

nothing calls this directly

Calls 1

generateKeysMethod · 0.95

Tested by

no test coverage detected