Skip to content

Instantly share code, notes, and snippets.

@skenderbeu
Created June 29, 2018 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skenderbeu/a6a555c40babd77421fd8c1ceedd7ada to your computer and use it in GitHub Desktop.
Save skenderbeu/a6a555c40babd77421fd8c1ceedd7ada to your computer and use it in GitHub Desktop.
private str getNonce(RecId _recId)
{
str nonce;
System.Random random = new System.Random();
System.Int32 randomNumber = random.Next();
if(_recId > 0)
{
nonce = int642str(_recId);
}
else
{
nonce = randomNumber.ToString();
}
nonce = subStr(nonce, 1, 16);
return nonce;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment