Lasso Soft Inc. > Home

[ cipher_open ]

Method

 

cipher_open(privateKeyFileData ::bytes, passPhrase ::bytes, data ::bytes) ::bytes
cipher_open(privateKeyFileData ::bytes, data ::bytes) ::bytes
 
[cipher_open] takes the private key file data (first parameter) along with a pass phrase (second parameter, which is optional) and uses them to cryptographically un-seal the given data (third parameter). This method uses DES EDE3 for the cipher block mode and returns a bytes object with the resulting data.
 
The data for third parameter should have been originally generated by [cipher_seal].
  • Syntax
No syntax description available at this time.
Examples
  • Beginner

 

This example creates a new key pair and uses them to first seal and then open a block of data.

Code

local(privKeyBytes, pubKeyBytes) = cipher_generate_key // default 2048 bits

	local(data = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software \
		like Aldus PageMaker including versions of Lorem Ipsum."->asBytes)
		
	local(sealed = cipher_seal(#pubKeyBytes, #data))
	
	cipher_open(#privKeyBytes, #sealed)

Result

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft