This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // #popclip extension for ChatGPT | |
| // name: ChatGPT Quick Actions | |
| // icon: iconify:logos:openai-icon | |
| // language: javascript | |
| // module: true | |
| // entitlements: [network] | |
| // options: [{ | |
| // identifier: apikey, label: API Key, type: string, | |
| // description: 'Obtain API key from https://platform.openai.com/account/api-keys' | |
| // }] | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public static string Encrypt(string source, string key) | |
| { | |
| Encoding encoding = new UTF8Encoding(); | |
| byte[] encodeKey = encoding.GetBytes(key); | |
| byte[] encodeSource = encoding.GetBytes(source); | |
| using (HMACSHA512 sha512 = new HMACSHA512(encodeKey)) | |
| { | |
| byte[] encryptSource = sha512.ComputeHash(encodeSource); |