Xbasic

rsa_hash Function

Syntax

c result = rsa_hash(C data ,C key [,C algorithm ])

Arguments

data

Character

key

Character

algorithm

Character

Description

General Security. Generates an RSA digital signature of the data using the key and SHA1, or any other signing method supported by the .NET Framework

Example

dim parameters as b = "name=some url parameters"

' Pull the RSA private key out of the file
dim pemFile as c = file.to_string("c:\\.pem")
pemFile = word(pemFile,2,"-----BEGIN RSA PRIVATE KEY-----")
pemFile = word(pemFile,1,"-----END RSA PRIVATE KEY-----")
pemFile = alltrim(pemFile)

? rsa_hash(parameters,pemFile)
= "EA1c/M2q9QhxTE/EgV5gljzAzeg8Xhj+0DY/7qzF4RXskp5g6ZDimRGJu1f........."