Skip to content

Commit

Permalink
removed logs
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavanakarwade committed Dec 18, 2024
1 parent 78a6ffc commit 7a21bde
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/api/Auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,17 +222,13 @@ export const addPasskeyUserDetails = async(payload: AddPassword, email:string) =

export const passwordEncryption = (password: string): string => {
const CRYPTO_PRIVATE_KEY: string = import.meta.env.PUBLIC_CRYPTO_PRIVATE_KEY;
console.log("🚀 ~ passwordEncryption ~ CRYPTO_PRIVATE_KEY:", CRYPTO_PRIVATE_KEY)
const encryptedPassword: string = CryptoJS.AES.encrypt(JSON.stringify(password), CRYPTO_PRIVATE_KEY).toString()
return encryptedPassword
}

export const encryptData = (value: any): string => {

console.log("All env variables:", import.meta.env);

const CRYPTO_PRIVATE_KEY: string = import.meta.env.PUBLIC_CRYPTO_PRIVATE_KEY;
console.log("🚀 ~ encryptData ~ CRYPTO_PRIVATE_KEY:", CRYPTO_PRIVATE_KEY)
const CRYPTO_PRIVATE_KEY: string = import.meta.env.PUBLIC_CRYPTO_PRIVATE_KEY;

try {
if (typeof (value) !== 'string') {
Expand All @@ -248,7 +244,6 @@ export const encryptData = (value: any): string => {

export const decryptData = (value: any): string => {
const CRYPTO_PRIVATE_KEY: string = import.meta.env.PUBLIC_CRYPTO_PRIVATE_KEY;
console.log("🚀 ~ decryptData ~ CRYPTO_PRIVATE_KEY:", CRYPTO_PRIVATE_KEY)

try {
let bytes = CryptoJS.AES.decrypt(value, CRYPTO_PRIVATE_KEY);
Expand Down

0 comments on commit 7a21bde

Please sign in to comment.