Class BcCryptoHelper.CustomRsaPublicKey

  • All Implemented Interfaces:
    java.io.Serializable, java.security.interfaces.RSAKey, java.security.interfaces.RSAPublicKey, java.security.Key, java.security.PublicKey
    Enclosing class:
    BcCryptoHelper

    public static class BcCryptoHelper.CustomRsaPublicKey
    extends java.lang.Object
    implements java.security.interfaces.RSAPublicKey
    Clave pública RSA con control directo de la creaci&oaccute;n como BigInteger de módulo y exponente (para evitar problemas de interpretación del signo (que puede darse en entornos como J2Obc).
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.math.BigInteger exponent  
      private byte[] keyBytes  
      private java.math.BigInteger modulus  
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      CustomRsaPublicKey​(byte[] pukBytes)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAlgorithm()  
      byte[] getEncoded()  
      java.lang.String getFormat()  
      java.math.BigInteger getModulus()  
      java.math.BigInteger getPublicExponent()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.security.interfaces.RSAKey

        getParams
    • Field Detail

      • keyBytes

        private final byte[] keyBytes
      • modulus

        private final java.math.BigInteger modulus
      • exponent

        private final java.math.BigInteger exponent
    • Constructor Detail

      • CustomRsaPublicKey

        CustomRsaPublicKey​(byte[] pukBytes)
                    throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getAlgorithm

        public java.lang.String getAlgorithm()
        Specified by:
        getAlgorithm in interface java.security.Key
      • getFormat

        public java.lang.String getFormat()
        Specified by:
        getFormat in interface java.security.Key
      • getEncoded

        public byte[] getEncoded()
        Specified by:
        getEncoded in interface java.security.Key
      • getModulus

        public java.math.BigInteger getModulus()
        Specified by:
        getModulus in interface java.security.interfaces.RSAKey
      • getPublicExponent

        public java.math.BigInteger getPublicExponent()
        Specified by:
        getPublicExponent in interface java.security.interfaces.RSAPublicKey