• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Create a SHA-1 value

Enthusiast ,
Mar 07, 2013 Mar 07, 2013

Copy link to clipboard

Copied

I have a need to pass data to somebody and they have asked for it to be in SHA-1

Encryption is not my thing, and I'm trying to get my head around it. I've read the DOC's and the forum and can't quite figure this out

I read that SHA-1 is a hashing algorithm not an encryption, so I'm not sure if I should be using the GenerateSecretKey, it all got a little confusing

Let's say I have a MAC address 11:22:33:44:55:66

How would I convert that to a SHA-1

Can anybody point me in the right direction? I don't want/need to do anything too complex.

Thanks

Mark

TOPICS
Advanced techniques

Views

634

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Mar 07, 2013 Mar 07, 2013

Looks like I managed to answer my own question. I used the HASH instead of ENCRYPT.

Example

<CFSET newstring=hash('teststring',"SHA-1")>

Can anybody out there confirm that this is correct. I gave me a hased number, which I presume is SHA-1 so I think I'm set

Returned: B8473B86D4C2072CA9B08BD28E373E8253E865C4

Votes

Translate

Translate
Enthusiast ,
Mar 07, 2013 Mar 07, 2013

Copy link to clipboard

Copied

Looks like I managed to answer my own question. I used the HASH instead of ENCRYPT.

Example

<CFSET newstring=hash('teststring',"SHA-1")>

Can anybody out there confirm that this is correct. I gave me a hased number, which I presume is SHA-1 so I think I'm set

Returned: B8473B86D4C2072CA9B08BD28E373E8253E865C4

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 08, 2013 Mar 08, 2013

Copy link to clipboard

Copied

That is correct. SHA-1 is a hash algorithm, not an encryption algorithm.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Mar 08, 2013 Mar 08, 2013

Copy link to clipboard

Copied

LATEST

As I have managed to answer my own question I guess I should mark a CORRECT answer, the little bit of code I used above was what I needed

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation