vault/ui/app/components/tools/hash.hbs
Vault Automation 9932623861
UI: Feature Descriptions (#12737) (#13055)
* add and update feature descriptions

* add description doc links, improve spacing,  remove dividers

* update tests

* Update ui/app/components/recovery/page/snapshots/load.hbs



* update seal action and tests

* use description argument for simple descriptions

* clean up

* update with finalized descriptions

* updated policy descriptions

* update client count description

* fix typo and update tests

* update tests

* more test updates

* Apply suggestions from code review



---------

Co-authored-by: lane-wetmore <lane.wetmore@hashicorp.com>
Co-authored-by: Kianna <30884335+kiannaquach@users.noreply.github.com>
2026-03-18 11:03:29 -05:00

92 lines
No EOL
3.1 KiB
Handlebars

{{!
Copyright IBM Corp. 2016, 2025
SPDX-License-Identifier: BUSL-1.1
}}
<Page::Header
@title="Hash data"
@description="Generate secure cryptographic hashes of input data to verify integrity without storing the raw data."
>
<:breadcrumbs>
<Page::Breadcrumbs @breadcrumbs={{this.breadcrumbs}} />
</:breadcrumbs>
</Page::Header>
{{#if this.sum}}
<div class="box is-fullwidth is-marginless">
<div class="field">
<label for="sum" class="is-input">Sum</label>
<Hds::Copy::Snippet
@textToCopy={{this.sum}}
@color="secondary"
data-test-tools-input="sum"
@onError={{fn (set-flash-message "Clipboard copy failed. The Clipboard API requires a secure context." "danger")}}
/>
</div>
</div>
<div class="field is-grouped box is-fullwidth is-bottomless">
<Hds::Button @text="Done" @color="secondary" {{on "click" this.reset}} data-test-button="Done" />
</div>
{{else}}
<form {{on "submit" this.handleSubmit}}>
<div class="box is-fullwidth is-marginless">
<MessageError @errorMessage={{this.errorMessage}} />
<div class="field">
<label for="hash-input" class="is-label">
Input
</label>
<div class="control">
<textarea
id="hash-input"
name="hashData"
value={{this.hashData}}
{{on "input" this.handleEvent}}
class="textarea"
data-test-tools-input="hash-input"
></textarea>
<B64Toggle
@value={{this.hashData}}
@isInput={{false}}
@onUpdate={{fn (mut this.hashData)}}
data-test-tools-input="b64-toggle"
/>
</div>
</div>
<div class="field is-horizontal">
<div class="field-body">
<div class="field">
<label for="algorithm" class="is-label">Algorithm</label>
<div class="control is-expanded">
<div class="select is-fullwidth">
<select name="algorithm" id="algorithm" {{on "change" this.handleEvent}}>
{{#each (sha2-digest-sizes) as |algo|}}
<option selected={{eq this.algorithm algo}} value={{algo}}>
{{algo}}
</option>
{{/each}}
</select>
</div>
</div>
</div>
<div class="field">
<label for="format" class="is-label"> Output format </label>
<div class="control is-expanded">
<div class="select is-fullwidth">
<select name="format" id="format" {{on "change" this.handleEvent}}>
{{#each (array "base64" "hex") as |formatOption|}}
<option selected={{eq this.format formatOption}} value={{formatOption}}>
{{formatOption}}
</option>
{{/each}}
</select>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="field is-grouped box is-fullwidth is-bottomless">
<Hds::Button @text="Hash" type="submit" data-test-submit />
</div>
</form>
{{/if}}