func (e *Engine) unsealMasterKey(ctx context.Context) ([]byte, error) {
	ts, err := newTriplesec(ctx, []byte(e.sess.Passphrase()))
	if err != nil {
		return nil, err
	}

	masterKey, err := e.sess.MasterKey()
	if err != nil {
		return nil, err
	}

	err = ctxutil.ErrIfDone(ctx)
	if err != nil {
		return nil, err
	}

	mk, err := ts.Decrypt(*masterKey)
	return mk, err
}
// unsealMasterKey uses the scrypt stretched password to decrypt the master
// password, which is encrypted with triplesec-v3
unsealMasterKey uses the scrypt stretched password to decrypt the master
password, which is encrypted with triplesec-v3
// unsealMasterKey uses the scrypt stretched password to decrypt the master // password which is encrypted with triplesec - v3
func (e *Engine) unsealMasterKey(ctx context.Context) ([]byte, error) {
	ts, err := newTriplesec(ctx, []byte(e.sess.Passphrase()))
	if err != nil {
		return nil, err
	}
	masterKey, err := e.sess.MasterKey()
	if err != nil {
		return nil, err
	}
	err = ctxutil.ErrIfDone(ctx)
	if err != nil {
		return nil, err
	}
	mk, err := ts.Decrypt(*masterKey)
	return mk, err
}
func ( e * Engine ) unsealMasterKey ( ctx context . Context ) ( [ ] byte , error ) { ts , err := newTriplesec ( ctx , [ ] byte ( e . sess . Passphrase ( ) ) ) if err != nil { return nil , err } masterKey , err := e . sess . MasterKey ( ) if err != nil { return nil , err } err = ctxutil . ErrIfDone ( ctx ) if err != nil { return nil , err } mk , err := ts . Decrypt ( * masterKey ) return mk , err }
unsealMasterKey uses the scrypt stretched password to decrypt the master
password, which is encrypted with triplesec-v3
unsealMasterKey uses the scrypt stretched password to decrypt the master password which is encrypted with triplesec - v3