Package 

Class AccountMetadataKey

    • Method Summary

      Modifier and Type Method Description
      String toString()
      final Array<ByteArray> derivePrivateUseMetadataKey(String ufvk, ZcashNetwork network, ByteArray privateUseSubject) Derives a metadata key for private use from this ZIP 325 Account Metadata Key.
      final JniMetadataKey toUnsafe() Exposes the type-unsafe variant for passing across the JNI.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • derivePrivateUseMetadataKey

         final Array<ByteArray> derivePrivateUseMetadataKey(String ufvk, ZcashNetwork network, ByteArray privateUseSubject)

        Derives a metadata key for private use from this ZIP 325 Account Metadata Key.

        If ufvk is non-null, this method will return one metadata key for every FVK item contained within the UFVK, in preference order. As UFVKs may in general change over time (due to the inclusion of new higher-preference FVK items, or removal of older deprecated FVK items), private usage of these keys should always follow preference order:

        • For encryption-like private usage, the first key in the array should always be used, and all other keys ignored.

        • For decryption-like private usage, each key in the array should be tried in turn until metadata can be recovered, and then the metadata should be re-encrypted under the first key.

        Parameters:
        ufvk - the external UFVK for which a metadata key is required, or null if the metadata key is "inherent" (for the same account as the Account Metadata Key).
        privateUseSubject - a globally unique non-empty sequence of at most 252 bytes that identifies the desired private-use context.
      • toUnsafe

         final JniMetadataKey toUnsafe()

        Exposes the type-unsafe variant for passing across the JNI.