func (v *Vault) ClearToken() {
	v.client.ClearToken()
}
ClearToken deletes the token cookie if it's set.
package hashi
import (
	"bytes"
	"encoding/base64"
	"errors"
	"fmt"
	"strconv"
	"strings"
	"sync"
	"github.com/xordataexchange/superdog"
	"github.com/xordataexchange/superdog/vault"
	"github.com/hashicorp/vault/api"
)
var ErrVersionMismatch = errors.New("Key returned does no match requested version")
var _ vault.Vault = &Vault{}
type Vault struct {
	client       *api.Client
	logical      *api.Logical
	config       *api.Config
	keyCache     map[string]*superdog.Key
	latestKey    map[string]uint64
	saltCache    map[string][]byte
	currentSalts map[string][]uint64
	latestSalt   map[string]uint64
	l            sync.Mutex
}
func NewVault(c *api.Config) (*Vault, error) {
	v := Vault{
		keyCache:     make(map[string]*superdog.Key),
		latestKey:    make(map[string]uint64),
		saltCache:    make(map[string][]byte),
		currentSalts: make(map[string][]uint64),
		latestSalt:   make(map[string]uint64),
	}
	client, err := api.NewClient(c)
	if err != nil {
		return &v, nil
	}
	v.config = c
	v.client = client
	v.logical = client.Logical()
	return &v, nil
}
func (v *Vault) SetToken(t string) {
	v.client.SetToken(t)
}
func (v *Vault) Token() string {
	return v.client.Token()
}