• Hello
Search Results for

    Show / Hide Table of Contents

    Struct ProtectedVector2

    Drop-in replacement for that obfuscates each component in memory (via GUPS.AntiCheat.Protected.UIntFloat reinterpret casts) and reports tampering to the .

    Implements
    IProtected
    IDisposable
    ISerializationCallbackReceiver
    Namespace: GUPS.AntiCheat.Protected
    Assembly: cs.temp.dll.dll
    Syntax
    public struct ProtectedVector2

    Constructors

    ProtectedVector2(Vector2)

    Initializes a new protected Vector2 with the specified value.

    Declaration
    public ProtectedVector2(Vector2 _Value)
    Parameters
    Type Name Description
    Vector2 _Value

    Initial value.

    Properties

    HasIntegrity

    Gets a value indicating whether the protected value still has integrity (i.e. the honeypot has not been tampered with).

    Declaration
    public bool HasIntegrity { get; }
    Property Value
    Type Description
    System.Boolean

    Value

    Gets or sets the unobfuscated value.

    Declaration
    public Vector2 Value { get; set; }
    Property Value
    Type Description
    Vector2
    Remarks

    Reading the value runs an integrity check; if the honeypot has been tampered with, the is notified.

    Methods

    CheckIntegrity()

    Returns true when the honeypot still matches the obfuscated value.

    Declaration
    public bool CheckIntegrity()
    Returns
    Type Description
    System.Boolean

    true if the value is intact; otherwise false.

    Dispose()

    Clears the obfuscated components, scratch union and secret.

    Declaration
    public void Dispose()

    Equals(Object)

    Returns true when this protected vector equals the given object.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj

    Object to compare with.

    Returns
    Type Description
    System.Boolean

    true if equal; otherwise false.

    Overrides
    System.ValueType.Equals(System.Object)

    GetHashCode()

    Returns the hash code of the unobfuscated value.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    Hash code of the unobfuscated value.

    Overrides
    System.ValueType.GetHashCode()

    Obfuscate()

    Rerolls the secret and re-obfuscates the current value.

    Declaration
    public void Obfuscate()

    OnAfterDeserialize()

    Unity deserialization hook; rebuilds the obfuscation state from the deserialized honeypot value.

    Declaration
    public void OnAfterDeserialize()

    OnBeforeSerialize()

    Unity serialization hook; writes the true value into the honeypot field.

    Declaration
    public void OnBeforeSerialize()

    ToString()

    Returns the string representation of the unobfuscated value.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    The string representation of the unobfuscated value.

    Overrides
    System.ValueType.ToString()

    Operators

    Equality(ProtectedVector2, ProtectedVector2)

    Returns true when both protected vectors represent the same value.

    Declaration
    public static bool operator ==(ProtectedVector2 v1, ProtectedVector2 v2)
    Parameters
    Type Name Description
    ProtectedVector2 v1

    First operand.

    ProtectedVector2 v2

    Second operand.

    Returns
    Type Description
    System.Boolean

    true if equal; otherwise false.

    Implicit(ProtectedQuaternion to ProtectedVector2)

    Implicitly converts a ProtectedQuaternion to a protected Vector2 (drops z/w).

    Declaration
    public static implicit operator ProtectedVector2(ProtectedQuaternion _Value)
    Parameters
    Type Name Description
    ProtectedQuaternion _Value

    Protected Quaternion to convert.

    Returns
    Type Description
    ProtectedVector2

    A protected Vector2 containing only the x/y components.

    Implicit(ProtectedVector2 to ProtectedQuaternion)

    Implicitly converts a protected Vector2 to a ProtectedQuaternion (zero z/w).

    Declaration
    public static implicit operator ProtectedQuaternion(ProtectedVector2 _Value)
    Parameters
    Type Name Description
    ProtectedVector2 _Value

    Protected Vector2 to convert.

    Returns
    Type Description
    ProtectedQuaternion

    A protected Quaternion (x, y, 0, 0).

    Implicit(ProtectedVector2 to Vector2)

    Implicitly unwraps a protected Vector2 to its value.

    Declaration
    public static implicit operator Vector2(ProtectedVector2 _Value)
    Parameters
    Type Name Description
    ProtectedVector2 _Value

    Protected Vector2 to unwrap.

    Returns
    Type Description
    Vector2

    The unobfuscated Vector2 value.

    Implicit(Vector2 to ProtectedVector2)

    Implicitly wraps a in a protected Vector2.

    Declaration
    public static implicit operator ProtectedVector2(Vector2 _Value)
    Parameters
    Type Name Description
    Vector2 _Value

    Value to wrap.

    Returns
    Type Description
    ProtectedVector2

    A protected Vector2 holding the given value.

    Inequality(ProtectedVector2, ProtectedVector2)

    Returns true when the two protected vectors represent different values.

    Declaration
    public static bool operator !=(ProtectedVector2 v1, ProtectedVector2 v2)
    Parameters
    Type Name Description
    ProtectedVector2 v1

    First operand.

    ProtectedVector2 v2

    Second operand.

    Returns
    Type Description
    System.Boolean

    true if not equal; otherwise false.

    Implements

    IProtected
    IDisposable
    ISerializationCallbackReceiver

    See Also

    ProtectedInt32
    In This Article
    Back to top GuardingPearSoftware documentation