My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Usage  

# Sample usage

Introduction

alice = DHKey.new
bob = DHKey.new(alice.base, alice.prime)
alice.their_public_key = bob.my_public_key
bob.their_public_key = alice.my_public_key

alice.shared_key == bob.shared_key  # => true

Sign in to add a comment
Powered by Google Project Hosting