# Getting a error when trying to add my rep in experimental code column

**URL:** https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714
**Category:** Ask for Help
**Created:** [September 2, 2023, 1:10pm UTC](https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714 "2023-09-02T13:10:04Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![Dilon\_Perera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilon_perera/32/85652_2.png) [@Dilon\_Perera](https://community.glideapps.com/u/Dilon_Perera)
#### Post date: [September 3, 2023, 2:53pm UTC](https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714/22 "2023-09-03T14:53:53Z")

</div>

Thanks a lot Darren! Really appreciate it!

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [September 3, 2023, 3:24pm UTC](https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714/23 "2023-09-03T15:24:31Z")

</div>

Sorry, I can’t figure it out. Maybe @ThinhDinh might be able to…

---

<div class="post-metadata">

### Author: ![Dilon\_Perera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilon_perera/32/85652_2.png) [@Dilon\_Perera](https://community.glideapps.com/u/Dilon_Perera)
#### Post date: [September 3, 2023, 3:25pm UTC](https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714/24 "2023-09-03T15:25:43Z")

</div>

No worries, Darren! Thanks for your help so much! I hope Thinh or someone else can help here!

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [September 3, 2023, 4:28pm UTC](https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714/26 "2023-09-03T16:28:10Z")

</div>

I had another look at this and I realised that you’re missing the `driver.js` file from your repo. After adding that and making a few other changes, I managed to get it to return an error message to Glide. I suspect that the function is firing before the Crypto-JS package is loaded, and so the library isn’t found. That’s as far as I’ve got…

---

<div class="post-metadata">

### Author: ![Dilon\_Perera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilon_perera/32/85652_2.png) [@Dilon\_Perera](https://community.glideapps.com/u/Dilon_Perera)
#### Post date: [September 3, 2023, 4:31pm UTC](https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714/27 "2023-09-03T16:31:45Z")

</div>

Hmm… What I should I have to do?

I was also trying to add the driver.js file after looking at the docs again but still no luck!

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/7/67dd9c65c6455218a22ed49090b9870413b4f51e.png)

Does I can fork you repo?

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [September 3, 2023, 4:33pm UTC](https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714/28 "2023-09-03T16:33:38Z")

</div>

Yes, go for it.

---

<div class="post-metadata">

### Author: ![Dilon\_Perera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilon_perera/32/85652_2.png) [@Dilon\_Perera](https://community.glideapps.com/u/Dilon_Perera)
#### Post date: [September 3, 2023, 4:36pm UTC](https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714/29 "2023-09-03T16:36:19Z")

</div>

Darren, sorry! Didn’t got it. You mean fork the repo right? In where?

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [September 3, 2023, 4:44pm UTC](https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714/30 "2023-09-03T16:44:05Z")

</div>

Go to your repo and look for forks. You should see mine there.

---

<div class="post-metadata">

### Author: ![Dilon\_Perera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilon_perera/32/85652_2.png) [@Dilon\_Perera](https://community.glideapps.com/u/Dilon_Perera)
#### Post date: [September 4, 2023, 5:29pm UTC](https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714/31 "2023-09-04T17:29:57Z")

</div>

Still no luck! Does anyone know the solution?

---

<div class="post-metadata">

### Author: ![Dilon\_Perera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilon_perera/32/85652_2.png) [@Dilon\_Perera](https://community.glideapps.com/u/Dilon_Perera)
#### Post date: [September 5, 2023, 5:14pm UTC](https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714/32 "2023-09-05T17:14:07Z")

</div>

Does doing this way is possible or using a 3rd party tool is the best?

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [September 6, 2023, 12:59am UTC](https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714/33 "2023-09-06T00:59:11Z")

</div>

What’s your use case for this?

---

<div class="post-metadata">

### Author: ![Dilon\_Perera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilon_perera/32/85652_2.png) [@Dilon\_Perera](https://community.glideapps.com/u/Dilon_Perera)
#### Post date: [September 6, 2023, 2:05pm UTC](https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714/34 "2023-09-06T14:05:54Z")

</div>

Thinh, I need to get the hash value for the given message and secret key!

Like this : [Hmac Generator - Code Amaze](https://codeamaze.com/web-tool/hmac-generator)

---

<div class="post-metadata">

### Author: ![Dilon\_Perera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilon_perera/32/85652_2.png) [@Dilon\_Perera](https://community.glideapps.com/u/Dilon_Perera)
#### Post date: [October 5, 2023, 1:48pm UTC](https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714/35 "2023-10-05T13:48:48Z")

</div>

Guys, does anyone knows the solution?

---

<div class="post-metadata">

### Author: ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)
#### Post date: [October 6, 2023, 10:17am UTC](https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714/36 "2023-10-06T10:17:16Z")

</div>

Could you use SHA-256? There’s a native column for that.

---

<div class="post-metadata">

### Author: ![Dilon\_Perera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilon_perera/32/85652_2.png) [@Dilon\_Perera](https://community.glideapps.com/u/Dilon_Perera)
#### Post date: [October 6, 2023, 10:24am UTC](https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714/37 "2023-10-06T10:24:19Z")

</div>

I can but needed the SHA 1 option. I tried with MAKE too but getting a error.

---

<div class="post-metadata">

### Author: ![Dilon\_Perera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilon_perera/32/85652_2.png) [@Dilon\_Perera](https://community.glideapps.com/u/Dilon_Perera)
#### Post date: [October 7, 2023, 10:27am UTC](https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714/38 "2023-10-07T10:27:54Z")

</div>

Anybody?

---

<div class="post-metadata">

### Author: ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)
#### Post date: [October 7, 2023, 5:19pm UTC](https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714/39 "2023-10-07T17:19:09Z")

</div>

You might have to get your hands dirty with some AppScript… I haven’t tried the below but I use appscript + SHA-256 in a project and it works well.

```auto
function runSHA1() {
  var text = "Your text here"; // Replace with your own text
  
  var sha1Hash = Utilities.computeDigest(Utilities.DigestAlgorithm.SHA_1, text);
  var sha1HashHex = Utilities.base64Encode(sha1Hash);
  
  Logger.log("SHA-1 Hash: " + sha1HashHex);
}

```

---

<div class="post-metadata">

### Author: ![Dilon\_Perera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilon_perera/32/85652_2.png) [@Dilon\_Perera](https://community.glideapps.com/u/Dilon_Perera)
#### Post date: [October 7, 2023, 5:59pm UTC](https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714/40 "2023-10-07T17:59:38Z")

</div>

Thanks Eric! I need to get the sha1 result based on the input and secret like here : [Aes - Code Amaze](https://codeamaze.com/web-tool/hmac-generator) How to do that?

---

<div class="post-metadata">

### Author: ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)
#### Post date: [October 7, 2023, 6:11pm UTC](https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714/41 "2023-10-07T18:11:46Z")

</div>

I’m out of the office at the moment but I will take a look this evening and whip something up 😉

---

<div class="post-metadata">

### Author: ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)
#### Post date: [October 8, 2023, 5:27am UTC](https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714/42 "2023-10-08T05:27:24Z")

</div>

Here you go… put the Input in A2 the Secret Key in B2 and your Output will go in C2.

```auto
function computeHMACSHA1() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  
  // Get the input text from cell A2 and B2
  var inputText = sheet.getRange("A2").getValue();
  var secretKey = sheet.getRange("B2").getValue();
  
  // Convert inputText and secretKey to Base64
  var inputTextBase64 = Utilities.base64Encode(inputText);
  var secretKeyBase64 = Utilities.base64Encode(secretKey);
  
  // Convert Base64 strings back to binary
  var inputBytes = Utilities.base64Decode(inputTextBase64);
  var keyBytes = Utilities.base64Decode(secretKeyBase64);
  
  // Implement HMAC-SHA1 manually
  var blockSize = 64; // HMAC-SHA1 block size
  if (keyBytes.length > blockSize) {
    keyBytes = Utilities.computeDigest(Utilities.DigestAlgorithm.SHA_1, keyBytes);
  }
  
  while (keyBytes.length < blockSize) {
    keyBytes.push(0);
  }
  
  var oKeyPad = [];
  var iKeyPad = [];
  
  for (var i = 0; i < blockSize; i++) {
    oKeyPad.push(keyBytes[i] ^ 0x5C);
    iKeyPad.push(keyBytes[i] ^ 0x36);
  }
  
  var innerHash = Utilities.computeDigest(Utilities.DigestAlgorithm.SHA_1, iKeyPad.concat(inputBytes));
  var finalHash = Utilities.computeDigest(Utilities.DigestAlgorithm.SHA_1, oKeyPad.concat(innerHash));
  
  // Convert the binary hash to a hexadecimal string
  var hmacSha1Hex = '';
  for (var i = 0; i < finalHash.length; i++) {
    var byte = finalHash[i];
    hmacSha1Hex += (byte & 0xFF).toString(16).padStart(2, '0'); // Format as two-digit hex without leading 0's
  }
  
  // Put the result in cell C2
  sheet.getRange("C2").setValue(hmacSha1Hex);
}

```

 ![Screenshot 2023-10-07 at 10.28.42 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/6/3687d6709a87b6286ead87e9d1e1dc0e4a5b4719.png)  
 ![Screenshot 2023-10-07 at 10.37.27 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/0/303776cfd34ff89422ee8926aefd2b0cf841d572.png)

[Previous page](https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714.md?page=1)

[Next page](https://community.glideapps.com/t/getting-a-error-when-trying-to-add-my-rep-in-experimental-code-column/65714.md?page=3)
