---
title: "PasswordHashingStrategy"
generated: true
---
<GenerationInfo sourceFile="packages/core/src/config/auth/password-hashing-strategy.ts" sourceLine="17" packageName="@vendure/core" since="1.3.0" />

Defines how user passwords get hashed when using the <DocsLink href="/reference/typescript-api/auth/native-authentication-strategy#nativeauthenticationstrategy">NativeAuthenticationStrategy</DocsLink>.

:::info

This is configured via the `authOptions.passwordHashingStrategy` property of
your VendureConfig.

:::

```ts title="Signature"
interface PasswordHashingStrategy extends InjectableStrategy {
    hash(plaintext: string): Promise<string>;
    check(plaintext: string, hash: string): Promise<boolean>;
}
```
* Extends: <DocsLink href="/reference/typescript-api/common/injectable-strategy#injectablestrategy">`InjectableStrategy`</DocsLink>



<div className="members-wrapper">

### hash

<MemberInfo kind="method" type={`(plaintext: string) => Promise<string>`}   />


### check

<MemberInfo kind="method" type={`(plaintext: string, hash: string) => Promise<boolean>`}   />




</div>
