Skip to content

Commit bfab948

Browse files
authored
Merge pull request MicrosoftDocs#596 from fbsolo/patch-21
Update crypt-gen-random-transact-sql.md
2 parents f2f4eb2 + 4ff4a48 commit bfab948

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/t-sql/functions/crypt-gen-random-transact-sql.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ manager: "craigg"
2828
# CRYPT_GEN_RANDOM (Transact-SQL)
2929
[!INCLUDE[tsql-appliesto-ss2008-asdb-xxxx-xxx-md](../../includes/tsql-appliesto-ss2008-asdb-xxxx-xxx-md.md)]
3030

31-
Returns a cryptographic random number generated by the Crypto API (CAPI). The output is a hexadecimal number of the specified number of bytes.
31+
This function returns a cryptographic, randomly-generated number, generated by the Crypto API (CAPI). `CRYPT_GEN_RANDOM` returns a hexadecimal number with a length of a specified number of bytes.
3232

3333
![Topic link icon](../../database-engine/configure-windows/media/topic-link.gif "Topic link icon") [Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md)
3434

@@ -40,27 +40,27 @@ CRYPT_GEN_RANDOM ( length [ , seed ] )
4040

4141
## Arguments
4242
*length*
43-
The length of the number being created. Maximum is 8000. *length* is type **int**.
43+
The length, in bytes, of the number that `CRYPT_GEN_RANDOM` will create. The *length* argument has an **int** data type, and a value range between 1 and 8000. `CRYPT_GEN_RANDOM` returns NULL for an **int** value outside this range.
4444

4545
*seed*
46-
Optional data to use as a random seed. There must be at least *length* bytes of data. *seed* is **varbinary(8000)**.
46+
An optional hexadecimal number, for use as a random seed value. The length of *seed* must match the value of the *length* argument. The *seed* argument has a **varbinary(8000)** data type.
4747

4848
## Returned Types
4949
**varbinary(8000)**
5050

5151
## Permissions
52-
This function is public and does not require any special permissions.
52+
This function is public and it does not require any special permissions.
5353

5454
## Examples
5555

5656
### A. Generating a random number
57-
The following example generates a random number 50 bytes long.
57+
This example generates a random number of length 50 bytes:
5858

5959
```sql
6060
SELECT CRYPT_GEN_RANDOM(50) ;
6161
```
6262

63-
The following example generates a random number 4 bytes long using a 4-byte seed.
63+
This example generates a random number of length 4 bytes, using a 4-byte seed:
6464

6565
```sql
6666
SELECT CRYPT_GEN_RANDOM(4, 0x25F18060) ;

0 commit comments

Comments
 (0)