Skip to content

jmrflora/rsa_keys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rsa_keys

Package Version Hex Docs

A small library to help with RSA keys.

installation

gleam add rsa_keys

example usage

import rsa_keys

pub fn main() {
  
  let #(pubkey, prvtkey) = rsa_keys.generate_rsa_keys()

  let result = {
    use signature <- result.try(rsa_keys.sign_message(
      bit_array.from_string("ola mundo"),
      prvtkey,
    ))
    rsa_keys.verify_message(
      message: bit_array.from_string("ola mundo"),
      public_key: pubkey,
      signature: signature,
    )
  }
  should.be_ok(result)
  |> should.be_true

}

Further documentation can be found at https://hexdocs.pm/rsa_keys.

Many thanks to the discord user julian.nz in the gleam discord server for the help with the erlang ffi

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors