Ejemplo n.º 1
0
        public Task <Tuple <byte[], string> > SignAsync(byte[] digest, string algorithm = null, CancellationToken token = default(CancellationToken))
        {
            if (_implementation == null)
            {
                throw new ObjectDisposedException("KeyVaultKey");
            }

            if (string.IsNullOrWhiteSpace(algorithm))
            {
                algorithm = DefaultSignatureAlgorithm;
            }

            // Never local
            return(_client.SignAsync(_implementation.Kid, algorithm, digest, token)
                   .ContinueWith(result => new Tuple <byte[], string>(result.Result.Result, algorithm), token));
        }