Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Adobe Campaign: HMAC-SHA1 encryption algorithm mechanism in javascript

Avatar

Avatar
Validate 1
Level 1
Sumit_Saha
Level 1

Likes

2 likes

Total Posts

11 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
Sumit_Saha
Level 1

Likes

2 likes

Total Posts

11 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
Sumit_Saha
Level 1

18-08-2016

Hi All,

I would require encryption of a field using HMAC-SHA1 encryption algorithm. It will take few parameters like key, cipherMode, data and generate a hex encrypted value in return. I need to encrypt a field value using HMAC-SHA1 mechanism inside JavaScript code.

Can you please help me with the process?

Happy Campaigning

Sumit

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 5
Level 3
Yassine_N
Level 3

Likes

20 likes

Total Posts

24 posts

Correct Reply

5 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Affirm 5
View profile

Avatar
Boost 5
Level 3
Yassine_N
Level 3

Likes

20 likes

Total Posts

24 posts

Correct Reply

5 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Affirm 5
View profile
Yassine_N
Level 3

27-09-2019

Hello,

Hope this will help you.

hmacStr

Calculates the MD5, SHA-1 or SHA-256 hash of a string of characters. The string is automatically encoded in UTF-8 before the calculation.

hmacStr (string [, key ] [, algo ])

Parameters

string

The string in which the hash is to be calculated.

key

Key, in the form of a string of characters. It is automatically converted into UTF-8. If the key is missing, the server will use a key that depends on the instance and is only valid on this instance.

algo

Type of hash to use. Possible values are "MD5", "SHA1" or "SHA256". Case is ignored, values can therefore be entered in lower case or upper case. The value "SHA1" is selected by default, if no parameter is specified.

You can find more info in here : ColdFusion Help | Encrypt

Answers (2)

Answers (2)

Avatar

Avatar
Contributor
Level 3
saikatk2447661
Level 3

Likes

22 likes

Total Posts

58 posts

Correct Reply

14 solutions
Top badges earned
Contributor
Shape 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Contributor
Level 3
saikatk2447661
Level 3

Likes

22 likes

Total Posts

58 posts

Correct Reply

14 solutions
Top badges earned
Contributor
Shape 1
Give Back 5
Give Back 3
Give Back
View profile
saikatk2447661
Level 3

16-09-2018

var message=new MemoryBuffer();

message.fromString("saikat");

var key=new MemoryBuffer();

key.fromString("password");

logInfo(message.hmac(key,"SHA1"))

Avatar

Avatar
Validate 1
Level 1
sivaramakumar_P
Level 1

Likes

2 likes

Total Posts

20 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
sivaramakumar_P
Level 1

Likes

2 likes

Total Posts

20 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
sivaramakumar_P
Level 1

14-03-2017

Hi Sumit,

Did you get any process for the above requested requirement. to encrypt and external teams to decrypt the values.

Thanks,

Sivaramakumar