Lasso Soft Inc. > Home

[ cipher_seal ]

Method

cipher_seal(publicKeyFileData ::bytes, data ::bytes) ::bytes

[cipher_seal] takes the public key file data (first parameter) and uses it to cryptographically seal the given data (second parameter). This method uses DES EDE3 for the cipher block mode and returns a bytes object with the resulting data.

The resulting data can be opened with [cipher_open].

  • 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