Package com.google.crypto.tink.util
Class SecretBigInteger
- java.lang.Object
-
- com.google.crypto.tink.util.SecretBigInteger
-
@Immutable public final class SecretBigInteger extends java.lang.ObjectA class storing a secret BigInteger, protecting the value viaSecretKeyAccess.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequalsSecretBigInteger(SecretBigInteger other)Returns true ifotherhas the same secret value.static SecretBigIntegerfromBigInteger(java.math.BigInteger value, SecretKeyAccess access)Creates a new SecretBigInteger with the content given invalue.java.math.BigIntegergetBigInteger(SecretKeyAccess access)Returns the value wrapped by this object.
-
-
-
Method Detail
-
fromBigInteger
public static SecretBigInteger fromBigInteger(java.math.BigInteger value, SecretKeyAccess access)
Creates a new SecretBigInteger with the content given invalue.The parameter
accessmust be non-null.
-
getBigInteger
public java.math.BigInteger getBigInteger(SecretKeyAccess access)
Returns the value wrapped by this object.The parameter
accessmust be non-null.
-
equalsSecretBigInteger
public boolean equalsSecretBigInteger(SecretBigInteger other)
Returns true ifotherhas the same secret value.Note that the time may depend on the length of the byte-encoding of the BigIntegers.
-
-