Class DiffieHellmanDerivationData

    • Method Detail

      • sharedInformation

        public final String sharedInformation()

        A string containing information that binds the ECDH derived key to the two parties involved or to the context of the key.

        It may include details like identities of the two parties deriving the key, context of the operation, session IDs, and optionally a nonce. It must not contain zero bytes. It is not recommended to reuse shared information for multiple ECDH key derivations, as it could result in derived key material being the same across different derivations.

        Returns:
        A string containing information that binds the ECDH derived key to the two parties involved or to the context of the key.

        It may include details like identities of the two parties deriving the key, context of the operation, session IDs, and optionally a nonce. It must not contain zero bytes. It is not recommended to reuse shared information for multiple ECDH key derivations, as it could result in derived key material being the same across different derivations.

      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)
      • fromSharedInformation

        public static DiffieHellmanDerivationData fromSharedInformation​(String sharedInformation)
        Create an instance of this class with sharedInformation() initialized to the given value.

        A string containing information that binds the ECDH derived key to the two parties involved or to the context of the key.

        It may include details like identities of the two parties deriving the key, context of the operation, session IDs, and optionally a nonce. It must not contain zero bytes. It is not recommended to reuse shared information for multiple ECDH key derivations, as it could result in derived key material being the same across different derivations.

        Parameters:
        sharedInformation - A string containing information that binds the ECDH derived key to the two parties involved or to the context of the key.

        It may include details like identities of the two parties deriving the key, context of the operation, session IDs, and optionally a nonce. It must not contain zero bytes. It is not recommended to reuse shared information for multiple ECDH key derivations, as it could result in derived key material being the same across different derivations.