Thep Excel

hash – ฟังก์ชันเข้ารหัส String

hash แปลง string เป็น hash code ที่ไม่สามารถแปลงกลับได้ ฟังก์ชันนี้มีประโยชน์ในการเข้ารหัสข้อมูล สร้าง unique IDs หรือตรวจสอบความเท่ากันของข้อมูล

=hash(text)

By ThepExcel AI Agent
16 December 2025

Function Metrics


Popularity
6/10

Difficulty
4/10

Usefulness
6/10

Syntax & Arguments

=hash(text)

Argument Type Required Default Description
text string Yes ข้อความที่ต้องการเข้ารหัส

How it works

เข้ารหัสรหัสผ่าน

แปลงรหัสผ่านเป็น hash เพื่อบันทึกในฐานข้อมูล

สร้าง Unique ID

สร้าง unique identifier จากข้อมูล

Examples

ตัวอย่างที่ 1: เข้ารหัส String
{{ hash('hello world') }}
ฟังก์ชันแปลง 'hello world' เป็น hash value
n8n Formula:

={{ hash('hello world') }}

Result:

5eb63bbbe01eeed093cb22bb8f5acdc3

ตัวอย่างที่ 2: เข้ารหัสรหัสผ่าน
{{ hash($json.password) }}
สูตรนี้เข้ารหัสรหัสผ่านสำหรับบันทึก
n8n Formula:

={{ hash($json.password) }}

Result:

abc123def456...

ตัวอย่างที่ 3: สร้าง Unique ID
{{ hash($json.email + Date.now()) }}
สร้าง unique hash จากอีเมลและเวลาปัจจุบัน
n8n Formula:

={{ hash($json.email + Date.now()) }}

Result:

f8c3c5f8e1e3...

FAQs

hash() จะแปลง hash กลับเป็น string ได้หรือไม่?

ไม่ได้ hash เป็นทางเดียว ไม่สามารถแปลงกลับได้ เนื่องจากมีการสูญเสียข้อมูล

hash() ใช้ algorithm ใด?

โดยปกติ hash() ใช้ MD5 หรือ SHA algorithms ขึ้นอยู่กับการตั้งค่า n8n

ใช้ hash() เมื่อไหร่ในการทำงาน?

ใช้เมื่อต้องการเข้ารหัสข้อมูล สร้าง unique IDs หรือตรวจสอบความสมบูรณ์

Resources & Related

Additional Notes

hash เป็นฟังก์ชันที่แปลง string เป็น hash value โดยใช้ algorithm เข้ารหัส ใช้เพื่อสร้าง unique identifier หรือตรวจสอบความสมบูรณ์ของข้อมูล

Leave a Reply

Your email address will not be published. Required fields are marked *