```ts
/**
 * A store with every value starred out.
 */
export function hideValues(
  store: Record<string, string>,
): Record<string, string> {
  const hidden: Record<string, string> = {};
  for (const key of Object.keys(store)) {
    hidden["*".repeat(store[key].length)] = store[key];
  }
  return hidden;
}
```

Fixed by using `store[key].length` (the value's length) instead of `key.length` (the key's length). This ensures each value is starred out with exactly as many asterisks as it contains characters.