Class RsaDecrypter

  • All Implemented Interfaces:
    Decrypter

    public class RsaDecrypter
    extends java.lang.Object
    implements Decrypter
    RSA blocks decrypter implementation.
    • Constructor Summary

      Constructors 
      Constructor Description
      RsaDecrypter​(java.lang.String algorithm, java.security.PrivateKey decryptionKey)
      Creates a new decrypter for the specified key pair using specific encryption algorithms.
      RsaDecrypter​(java.security.PrivateKey decryptionKey)
      Creates a decrypter for the specified key, using default encryption algorithms.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String decrypt​(java.lang.String ciphertext)
      Decrypts data encrypted with RSA blocks.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RsaDecrypter

        public RsaDecrypter​(java.security.PrivateKey decryptionKey)
        Creates a decrypter for the specified key, using default encryption algorithms.
        Parameters:
        decryptionKey - the private key used for decryption
      • RsaDecrypter

        public RsaDecrypter​(java.lang.String algorithm,
                            java.security.PrivateKey decryptionKey)
        Creates a new decrypter for the specified key pair using specific encryption algorithms.
        Parameters:
        algorithm - the rsa encryption algorithm
        decryptionKey - the private key used for decryption
    • Method Detail

      • decrypt

        public java.lang.String decrypt​(java.lang.String ciphertext)
        Decrypts data encrypted with RSA blocks.
        Specified by:
        decrypt in interface Decrypter
        Parameters:
        ciphertext - the ciphertext to be decrypted
        Returns:
        the decrypted text