ldap-passwords
Advanced tools
Comparing version 1.1.1 to 2.0.0
import { md5, verifyMD5 } from 'ldap-md5'; | ||
import { ssha, verifySSHA } from 'ldap-sha'; | ||
import { sha512Crypt, verifySha512 } from 'ldap-sha512'; | ||
export { md5, verifyMD5, sha512Crypt, verifySha512 }; | ||
export { md5, verifyMD5, ssha, verifySSHA, sha512Crypt, verifySha512 }; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"hash": "711357ed", | ||
"configHash": "5a8f2016", | ||
"lockfileHash": "fec3942e", | ||
"browserHash": "8c6d6124", | ||
"hash": "f1062d9a", | ||
"configHash": "ee8c9136", | ||
"lockfileHash": "9495ced3", | ||
"browserHash": "f2db76a9", | ||
"optimized": { | ||
"vue": { | ||
"src": "../../../../node_modules/.pnpm/vue@3.4.14_typescript@5.3.3/node_modules/vue/dist/vue.runtime.esm-bundler.js", | ||
"src": "../../../../node_modules/.pnpm/vue@3.4.15_typescript@5.3.3/node_modules/vue/dist/vue.runtime.esm-bundler.js", | ||
"file": "vue.js", | ||
"fileHash": "b1b06806", | ||
"fileHash": "914be7ee", | ||
"needsInterop": false | ||
@@ -16,15 +16,15 @@ }, | ||
"file": "vitepress___@vue_devtools-api.js", | ||
"fileHash": "85373c6f", | ||
"fileHash": "37e724e4", | ||
"needsInterop": false | ||
}, | ||
"vitepress > @vueuse/core": { | ||
"src": "../../../../node_modules/.pnpm/@vueuse+core@10.7.2_vue@3.4.14/node_modules/@vueuse/core/index.mjs", | ||
"src": "../../../../node_modules/.pnpm/@vueuse+core@10.7.2_vue@3.4.15/node_modules/@vueuse/core/index.mjs", | ||
"file": "vitepress___@vueuse_core.js", | ||
"fileHash": "b25a0986", | ||
"fileHash": "678d17f1", | ||
"needsInterop": false | ||
}, | ||
"vitepress > @vueuse/integrations/useFocusTrap": { | ||
"src": "../../../../node_modules/.pnpm/@vueuse+integrations@10.7.2_focus-trap@7.5.4_vue@3.4.14/node_modules/@vueuse/integrations/useFocusTrap.mjs", | ||
"src": "../../../../node_modules/.pnpm/@vueuse+integrations@10.7.2_focus-trap@7.5.4_vue@3.4.15/node_modules/@vueuse/integrations/useFocusTrap.mjs", | ||
"file": "vitepress___@vueuse_integrations_useFocusTrap.js", | ||
"fileHash": "0c6f2936", | ||
"fileHash": "6a1c3d59", | ||
"needsInterop": false | ||
@@ -35,3 +35,3 @@ }, | ||
"file": "vitepress___mark__js_src_vanilla__js.js", | ||
"fileHash": "ee41ffee", | ||
"fileHash": "c790484c", | ||
"needsInterop": false | ||
@@ -42,9 +42,9 @@ }, | ||
"file": "vitepress___minisearch.js", | ||
"fileHash": "c47c0d12", | ||
"fileHash": "11b8dcb9", | ||
"needsInterop": false | ||
}, | ||
"@vercel/analytics": { | ||
"src": "../../../../node_modules/.pnpm/@vercel+analytics@1.1.1/node_modules/@vercel/analytics/dist/index.js", | ||
"src": "../../../../node_modules/.pnpm/@vercel+analytics@1.1.2/node_modules/@vercel/analytics/dist/index.js", | ||
"file": "@vercel_analytics.js", | ||
"fileHash": "57c3898e", | ||
"fileHash": "bd70a36e", | ||
"needsInterop": false | ||
@@ -54,9 +54,9 @@ } | ||
"chunks": { | ||
"chunk-AJSOBZTJ": { | ||
"file": "chunk-AJSOBZTJ.js" | ||
"chunk-LVWCKBRU": { | ||
"file": "chunk-LVWCKBRU.js" | ||
}, | ||
"chunk-UASK3DFV": { | ||
"file": "chunk-UASK3DFV.js" | ||
"chunk-SFLLFODM": { | ||
"file": "chunk-SFLLFODM.js" | ||
} | ||
} | ||
} |
@@ -1,4 +0,4 @@ | ||
// node_modules/.pnpm/@vercel+analytics@1.1.1/node_modules/@vercel/analytics/dist/index.js | ||
// node_modules/.pnpm/@vercel+analytics@1.1.2/node_modules/@vercel/analytics/dist/index.js | ||
var name = "@vercel/analytics"; | ||
var version = "1.1.1"; | ||
var version = "1.1.2"; | ||
var initQueue = () => { | ||
@@ -5,0 +5,0 @@ if (window.va) |
@@ -274,4 +274,4 @@ import { | ||
whenever | ||
} from "./chunk-AJSOBZTJ.js"; | ||
import "./chunk-UASK3DFV.js"; | ||
} from "./chunk-LVWCKBRU.js"; | ||
import "./chunk-SFLLFODM.js"; | ||
export { | ||
@@ -278,0 +278,0 @@ DefaultMagicKeysAliasMap, |
import { | ||
tryOnScopeDispose, | ||
unrefElement | ||
} from "./chunk-AJSOBZTJ.js"; | ||
} from "./chunk-LVWCKBRU.js"; | ||
import { | ||
ref, | ||
watch | ||
} from "./chunk-UASK3DFV.js"; | ||
} from "./chunk-SFLLFODM.js"; | ||
@@ -1023,3 +1023,3 @@ // node_modules/.pnpm/tabbable@6.2.0/node_modules/tabbable/dist/index.esm.js | ||
// node_modules/.pnpm/@vueuse+integrations@10.7.2_focus-trap@7.5.4_vue@3.4.14/node_modules/@vueuse/integrations/useFocusTrap.mjs | ||
// node_modules/.pnpm/@vueuse+integrations@10.7.2_focus-trap@7.5.4_vue@3.4.15/node_modules/@vueuse/integrations/useFocusTrap.mjs | ||
function useFocusTrap(target, options = {}) { | ||
@@ -1026,0 +1026,0 @@ let trap; |
@@ -161,3 +161,3 @@ import { | ||
withScopeId | ||
} from "./chunk-UASK3DFV.js"; | ||
} from "./chunk-SFLLFODM.js"; | ||
export { | ||
@@ -164,0 +164,0 @@ BaseTransition, |
@@ -27,2 +27,11 @@ import { defineConfig } from 'vitepress' | ||
{ | ||
text: 'SSHA', | ||
items: [ | ||
{ text: 'ssha', link: '/guide/ssha' }, | ||
{ text: 'verifySSHA', link: '/guide/verifyssha' }, | ||
{ text: 'SSHA Online Generator', link: '/online/ssha' }, | ||
{ text: 'SSHA Online Validator', link: '/online/verifyssha' }, | ||
], | ||
}, | ||
{ | ||
text: 'MD5', | ||
@@ -29,0 +38,0 @@ items: [ |
import { defineConfig } from 'vitepress' | ||
export default defineConfig({ | ||
lang: 'en-US', | ||
lang: 'pt-BR', | ||
description: 'ldap-passwords oferece hashing e verificação de senhas usando algoritmos de senha do LDAP.', | ||
@@ -57,2 +57,11 @@ themeConfig: { | ||
{ | ||
text: 'SSHA', | ||
items: [ | ||
{ text: 'ssha', link: '/pt/guide/ssha' }, | ||
{ text: 'verifySSHA', link: '/pt/guide/verifyssha' }, | ||
{ text: 'SSHA Gerador Online', link: '/pt/online/ssha' }, | ||
{ text: 'SSHA Validador Online', link: '/pt/online/verifyssha' }, | ||
], | ||
}, | ||
{ | ||
text: 'MD5', | ||
@@ -59,0 +68,0 @@ items: [ |
@@ -20,3 +20,4 @@ --- | ||
- title: ⚡️ SHA512 | ||
- title: 💡 SSHA | ||
- title: 💥 MD5 | ||
--- |
@@ -15,3 +15,3 @@ # verifyMD5 | ||
## 2. Valide sua senha em texto simples com uma senha criptografada MD5: | ||
**A senha MD5 pode ser uma única string ou um array de strings. A senha em texto simples será comparada com cada senha sha512 e a função retornará true se alguma delas corresponder** | ||
**A senha MD5 pode ser uma única string ou um array de strings. A senha em texto simples será comparada com cada senha MD5 e a função retornará true se alguma delas corresponder** | ||
```ts | ||
@@ -18,0 +18,0 @@ const isValid = verifyMD5('mySuperSecretPassword', arrayOfMD5Passwords) |
@@ -20,3 +20,4 @@ --- | ||
- title: ⚡️ SHA512 | ||
- title: 💡 SSHA | ||
- title: 💥 MD5 | ||
--- |
{ | ||
"name": "ldap-passwords", | ||
"type": "module", | ||
"version": "1.1.1", | ||
"version": "2.0.0", | ||
"description": "ldap-passwords offers secure password hashing and verification using LDAP password algorithms.", | ||
@@ -17,2 +17,3 @@ "author": { | ||
"md5", | ||
"ssha", | ||
"ldap", | ||
@@ -36,8 +37,9 @@ "crypt", | ||
"ldap-md5": "^1.0.2", | ||
"ldap-sha": "^1.0.0", | ||
"ldap-sha512": "^2.1.2" | ||
}, | ||
"devDependencies": { | ||
"@antfu/eslint-config": "^2.6.2", | ||
"@types/node": "^20.11.4", | ||
"@vercel/analytics": "^1.1.1", | ||
"@antfu/eslint-config": "^2.6.3", | ||
"@types/node": "^20.11.5", | ||
"@vercel/analytics": "^1.1.2", | ||
"eslint": "^8.56.0", | ||
@@ -44,0 +46,0 @@ "typescript": "^5.3.3", |
@@ -29,2 +29,3 @@ <a href="http://ldap-passwords.com/"> | ||
- SHA512 CRYPT | ||
- SSHA | ||
- MD5 | ||
@@ -67,2 +68,22 @@ | ||
## 💡 SSHA | ||
1. Import the function into your project: | ||
```ts | ||
import { ssha, verifySSHA } from 'ldap-passwords' | ||
``` | ||
2. Encrypt a plain text password using SSHA: | ||
```ts | ||
const encryptedPassword = ssha('mySuperSecretPassword') | ||
// return {SSHA}sTIysPunEI4boe6OwgQO+/tRZao2OWJIbDMvY0g2UlM= | ||
``` | ||
3. Validate your plain text password with a MD5 encrypted password:\ | ||
**The SSHA password can be either a single string or an array of strings. The plain text password will be compared to each SSHA password and the function will return true if any of them matches** | ||
```ts | ||
const isValid = verifySSHA('mySuperSecretPassword', arrayOfSSHAPasswords) | ||
// return true or false | ||
``` | ||
## 💥 MD5 | ||
@@ -91,2 +112,2 @@ | ||
Copyright © 2024 [Gabriel 'DethDKN' Rosa](https://github.com/dethdkn)\ | ||
This project is under [MIT license](https://github.com/dethdkn/ldap-sha512/blob/main/LICENSE) | ||
This project is under [MIT license](https://github.com/dethdkn/ldap-passwords/blob/main/LICENSE) |
@@ -33,2 +33,30 @@ /** | ||
* @function | ||
* Encrypt a plain text password with the Ldap SSHA algorithm. | ||
* | ||
* @param {string} textPassword - Plain text password. | ||
* @returns {string} - Encrypted password with the Ldap SSHA algorithm. | ||
* | ||
* | ||
* @example | ||
* const encryptedPassword = ssha('mySuperSecretPassword') | ||
* // return {SSHA}sTIysPunEI4boe6OwgQO+/tRZao2OWJIbDMvY0g2UlM= | ||
* | ||
*/ | ||
export declare function ssha(textPassword: string): string | ||
/** | ||
* @function | ||
* Verify passwords encrypted with SSHA. | ||
* | ||
* @param {string} textPassword - Plain text password. | ||
* @param {string | string[]} sshaPassword - String or Array of strings to be compared to the plain text password. | ||
* | ||
* @example | ||
* const isValid = verifySSHA('mySuperSecretPassword', arrayOfSSHAPasswords) | ||
* // return true or false | ||
*/ | ||
export declare function verifySSHA(textPassword: string, sshaPassword: string | string[]): boolean | ||
/** | ||
* @function | ||
* Encrypt a plain text password with the Ldap sha512crypt algorithm. | ||
@@ -35,0 +63,0 @@ * |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
2448598
61
26485
111
3
+ Addedldap-sha@^1.0.0
+ Addedldap-sha@1.0.0(transitive)