Class SecretBigInteger


  • @Immutable
    public final class SecretBigInteger
    extends java.lang.Object
    A class storing a secret BigInteger, protecting the value via SecretKeyAccess.
    • Method Detail

      • fromBigInteger

        public static SecretBigInteger fromBigInteger​(java.math.BigInteger value,
                                                      SecretKeyAccess access)
        Creates a new SecretBigInteger with the content given in value.

        The parameter access must be non-null.

      • getBigInteger

        public java.math.BigInteger getBigInteger​(SecretKeyAccess access)
        Returns the value wrapped by this object.

        The parameter access must be non-null.

      • equalsSecretBigInteger

        public boolean equalsSecretBigInteger​(SecretBigInteger other)
        Returns true if other has the same secret value.

        Note that the time may depend on the length of the byte-encoding of the BigIntegers.