---
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 [NativeAuthenticationStrategy](/reference/typescript-api/auth/native-authentication-strategy#nativeauthenticationstrategy).

:::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: [`InjectableStrategy`](/reference/typescript-api/common/injectable-strategy#injectablestrategy)



<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>
