Java BigInteger Calculate cryptRSA(byte[] data, BigInteger exponent, BigInteger modulus)

Here you can find the source of cryptRSA(byte[] data, BigInteger exponent, BigInteger modulus)

Description

crypt RSA

License

Apache License

Declaration

public static byte[] cryptRSA(byte[] data, BigInteger exponent, BigInteger modulus) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.math.BigInteger;

public class Main {
    public static byte[] cryptRSA(byte[] data, BigInteger exponent, BigInteger modulus) {
        return new BigInteger(data).modPow(exponent, modulus).toByteArray();
    }//from w w w .  ja v  a 2 s . c o m
}

Related

  1. copy_into_byte_array(BigInteger bi, byte[] a)
  2. copyOf(BigInteger[] data, int newLength)
  3. copyOfRange(BigInteger[] data, int from, int to)
  4. createUnsignedBigInteger(byte[] data)
  5. createUUID(int version, String gtin, BigInteger phar)
  6. decodeBigInteger(String value)
  7. decodeBitListFromBigInteger(BigInteger bits)
  8. decodeFloat(BigInteger rawSign, BigInteger rawExponent, BigInteger rawMantissa, int signWidth, int exponentWidth, int mantissaWidth, int bias, MathContext mc)
  9. decodeToBigInteger(String input)