Exemplo n.º 1
0
        /// <summary>
        /// Build a JWE value from it's elements and set to it.
        /// </summary>
        /// <param name="header">A variable-size JWE protected header.</param>
        /// <param name="key">A variable-size encrypted key.
        /// This can be an empty octet sequence.</param>
        /// <param name="initVector">A fixed-size, 96-bit, base64 encoded Jwe initialization vector.
        /// If not required by the encryption algorithm, can be an empty octet sequence.</param>
        /// <param name="cipherText">The variable-size base64 encoded cipher text.</param>
        /// <param name="authTag">A fixed-size, 132-bit, base64 encoded authentication tag.
        /// Can be an empty octet sequence.</param>
        public void Set(string header, string key, string initVector, string cipherText, string authTag)
        {
            if (disabled)
            {
                return;
            }

            Dispatchers.LaunchAPI(() => {
                LibGleanFFI.glean_jwe_set(this.handle, header, key, initVector, cipherText, authTag);
            });
        }