function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
karimulla salesforcekarimulla salesforce 

how to use salt in saleforce for encryption and decryption like C#

How to use the salt in the salesforce for encryption and decryption in salseforce like C#... any ideas ??? 

Thanks in advance
Raj VakatiRaj Vakati
 It wnt  .. salesforce no such way to have salt ..  you can use the private key with AES_Encrypt  and  decryption 
..
// Apex Code
  public static final String MY_KEY = 'MARKETING'; // it always must  be 32bytes 
  public static final String MY_IV = 'HR$2pIjHR$2pIj12'; //it always will be 16 bytes
  public static final String ALGORITHM_NAME = 'AES256';
  public static Blob encrypt(String valueToEncrypt){
    Blob key = Crypto.generateDigest('SHA256', Blob.valueOf(MY_KEY));
    Blob iv = Blob.valueOf(MY_IV);
    Blob data = Blob.valueOf(valueToEncrypt);
    return Crypto.encrypt(ALGORITHM_NAME, key, iv, data);
  }

https://salesforce.stackexchange.com/questions/209341/encryption-and-decryption-using-net-application

https://salesforce.stackexchange.com/questions/191667/encryption-and-decryption-in-apex-salesforce-using-crypto-class