You need to sign in to do that
Don't have an account?
How to generate 16 byte from the 64byte from the below code?
Hello All,
Can anyone please suggest how to generate 16byte from 64byte string.I have provided the sample code.Please provide me solution for the same with certain modifications to this code or new code.
public static String createHash(String preHashValue) {
Blob bPrehash = Blob.valueOf(preHashValue);
String convertedPrehash = EncodingUtil.convertToHex(bPrehash);
Blob bHexPrehash = Blob.valueOf(convertedPrehash);
Blob bsig = Crypto.generateDigest('SHA1', bHexPrehash);
String result = EncodingUtil.convertToHex(bsig);
return result;
}
Thanks,
Nida
Can anyone please suggest how to generate 16byte from 64byte string.I have provided the sample code.Please provide me solution for the same with certain modifications to this code or new code.
public static String createHash(String preHashValue) {
Blob bPrehash = Blob.valueOf(preHashValue);
String convertedPrehash = EncodingUtil.convertToHex(bPrehash);
Blob bHexPrehash = Blob.valueOf(convertedPrehash);
Blob bsig = Crypto.generateDigest('SHA1', bHexPrehash);
String result = EncodingUtil.convertToHex(bsig);
return result;
}
Thanks,
Nida