SHA – PB Docs 2017

SHA

PowerScript function

Description

Calculates the SHA value of a blob.

Applies to

CrypterObject objects

Syntax

Argument

Description

crypter

The name of the CrypterObject object

algorithm

A value of the SHAAlgorithm enumerated type that specifies
the type of SHA algorithm.

Values are:

  • SHA1! – SHA1

  • SHA224! – SHA224

  • SHA256! – SHA256

  • SHA384! – SHA384

  • SHA512! – SHA512

  • SHA3_224! – SHA3-224

  • SHA3_256! – SHA3-256

  • SHA3_384! – SHA3-384

  • SHA3_512! – SHA3-512

variable

A blob whose value is the data you want to process with
SHA.

When using the system blob function to convert a string to
a blob, it is recommended to specify its encoding argument to be
EncodingANSI! (for English characters only) or EncodingUTF8!,
otherwise, the default EncodingUTF16LE! will be used.

Return value

Blob. Returns the result of the SHA if it succeeds. If any
argument’s value is null, the method returns null. If an error occurs,
throw the exception.

Examples

This statement encrypts the data using SHA1.

See also

SymmetricEncrypt

SymmetricDecrypt

AsymmetricEncrypt

AsymmetricDecrypt

AsymmetricSign

AsymmetricVerifySign

AsymmetricGenerateKey

MD5

HMAC


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x