Capy-Bearer Documentation

gen_sha1

host call

Capy

function gen_sha1(value : string) string

Description

gen_sha1() returns 20 raw SHA-1 bytes. Use hex(gen_sha1(value)) when you need lowercase hexadecimal text.

Use it only for SHA-1 compatibility.

Parameters

value : bytes to hash

Return Values

Raw 20-byte SHA-1 digest.

Example

Capy

print(hex(gen_sha1("abc")), "\n")