Sha256: f6e8276c7a66f7bde7f03aaca7331286c1b5287fbfdca57d5089f126e5163676

Contents?: true

Size: 871 Bytes

Versions: 1

Compression:

Stored size: 871 Bytes

Contents

require 'fiddle'
require 'fiddle/import'

require_relative 'wrapper'

module Oqs
  module KEMWrapper
   extend Fiddle::Importer
   include Oqs::Wrapper

   #dlload File.join(File.dirname(__FILE__),"..","..","native","linux","x86_64","liboqs.so.0.7.0")
   load_oqs_lib

   extern 'const char * OQS_KEM_alg_identifier(size_t i)'
   extern 'int OQS_KEM_alg_count(void)'
   extern 'int OQS_KEM_alg_is_enabled(const char * name)'

   extern 'OQS_KEM * OQS_KEM_new(const char * algo)'
   extern 'void OQS_KEM_free(OQS_KEM * kem)'

   extern 'int OQS_KEM_keypair(const OQS_KEM *kem, uint8_t *public_key, uint8_t *secret_key)'
   
   extern 'int OQS_KEM_encaps(const OQS_KEM *kem, uint8_t * ciphertext, uint8_t *shared_secret, uint8_t *public_key)'
   extern 'int OQS_KEM_decaps(const OQS_KEM *kem, uint8_t * shared_secret, uint8_t *ciphertext, uint8_t *secret_key)'

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
liboqs-0.1.0 lib/oqs/kem_wrapper.rb